Curl

Slacker

Slacking Guru
Messages
316
Location
placetoplace
Ok I am bit confused.
the code below works enough to copy my RSS feed and post it. However I am unable to transfer the link over with the heading.

When I do I get a link but it is to the page I am viewing.

I want to use Curl to copy the content of my Rss feed and return it with links to the mp3

<?php

$ch = curl_init("http://roaddogsradio.com/hrrrss.xml");
$fp = fopen("example_homepage.html", "w");

curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);

curl_exec($ch);
curl_close($ch);
fclose($fp);


$xml = simplexml_load_file('example_homepage.html');
print "<ul>\n";
foreach ($xml->channel->item as $item){
print "<li>$item->title</li>\n";
}

print "</ul>";

?>


**Edit** am I using the wrong language? Is Curl only to copy the contents of the page?
 
Last edited:
Back
Top Bottom