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 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); } ?> 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 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
Archived
This topic is now archived and is closed to further replies.