Need help with XML and PHP

Discussion in 'PHP' started by dotmd, Jan 19, 2009.

  1. #1
    dotmd, Jan 19, 2009 IP
  2. mallorcahp

    mallorcahp Peon

    Messages:
    141
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This should get you started:

     
    mallorcahp, Jan 19, 2009 IP
  3. dotmd

    dotmd Peon

    Messages:
    41
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you a lot!

    One more thing. Is it possible to set up a cron to the .php file and the .xml should be just once a day and not every time the page is refreshed?
     
    dotmd, Jan 19, 2009 IP
  4. mallorcahp

    mallorcahp Peon

    Messages:
    141
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Why? You need to load the .xml file to get the data. The alternative would be to get a cron to create the php file itself with the xml data hardcoded ... not sure you'd want to do that though ...

    You could also reference a file rather than a url ( eg. simplexml_load_file('/data/feed.xml'); ) if you are trying to reduce http requests if thats what you mean ...
     
    mallorcahp, Jan 19, 2009 IP