Hi guys, the first time on the forum, so scream if I don't know it right.
I tried about a day to get the XML file in my application. This is usually not a problem, and I have two other channels that enter the application using the simpleXml method that I provided below.
My problem is that this other page is an aspx page and seems to have some kind of redirect or maybe just use the aspx framework that uses a clean url.
This is the script I used for two other data streams that work fine.
$grb_feed_url = 'http://www.grb.uk.com/rss.php'; $grb_jobs = simplexml_load_file($grb_feed_url, 'SimpleXMLElement', LIBXML_NOCDATA);
This is great, but when I try it for the URL http://www.milkround.com/rss.aspx , it returns nothing.
Then I tried the cURL script, this file is great for the godaddy example, but returns nothing for the Milkround URL. It’s also strange that if I delete the line CURLOPT_FOLLOWLOCATION or set it to 0, it will return with a “moved object”.
function get_data($url) { $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $data = curl_exec($ch); curl_close($ch); return $data; } $returned_content = get_data('http://www.milkround.com/rss'); print_r($returned_content);
Any help would be really appreciated.
Thanks in advance.