topflight Posted October 7, 2009 Share Posted October 7, 2009 Hello I am stuck and confused on trying to convert an RSS feed into PHP. May somebody please give me a pointer on how to convert the following RSS Feed into php so I can display it on my site thanks! http://www.flightstats.com/go/rss/airportdelays.do thanks in advanced Quote Link to comment https://forums.phpfreaks.com/topic/176852-converting-rss-feed-into-php/ Share on other sites More sharing options...
RussellReal Posted October 7, 2009 Share Posted October 7, 2009 <?php function getFile($url) { $c = curl_init($url); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_HEADER, 0); $res = curl_exec($c); curl_close($c); return $res; } $i = getFile("http://www.flightstats.com/go/rss/airportdelays.do"); $xml = simplexml_load_string($i); foreach ($xml->channel->item as $k => $v) { print_r($v); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/176852-converting-rss-feed-into-php/#findComment-932503 Share on other sites More sharing options...
topflight Posted October 7, 2009 Author Share Posted October 7, 2009 But it is not displaying it like the RSS feed is, it is just showing a blob text Quote Link to comment https://forums.phpfreaks.com/topic/176852-converting-rss-feed-into-php/#findComment-932671 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.