getFeed Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
olly79
Forum Newbie
Posts: 3
Joined: Sun Jan 18, 2009 4:09 pm

getFeed Question

Post by olly79 »

Hi all,

I'm retrieving an XML feed via php:

Code: Select all

<?php
   header('Content-type: text/xml');
   echo file_get_contents('http://www.somexmlfeed.com/feed.xml');
?>
Now this is working fine and I'm able to work with the XML data to populate my website - this data is only updated when the page is refreshed; therefore I wondered if there was a way I could send out this request every couple of seconds without a page refresh?

Any help much appreciated as I'm struggling with this.
Last edited by Benjamin on Tue May 26, 2009 10:11 am, edited 1 time in total.
Reason: Changed code type from text to php.
Post Reply