How to print an xml file to the screen in php?
This is not working:
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, \'http://rss.news.y
You can use HTTP URLs as if they were local files, thanks to PHP's wrappers
You can get the contents from an URL via file_get_contents() and then echo it, or even read it directly using readfile()
$file = file_get_contents('http://example.com/rss');
echo $file;
or
readfile('http://example.com/rss');
Don't forget to set the correct MIME type before outputing anything, though.
header('Content-type: text/xml');