<?php
header('Content-Type: application/xml');
$tmpFile = 'tmpFile.txt';
$val = $_GET["http://rss.news.yahoo.com/rss/us.rss"];
echo ($val);
$curlHandle = curl_init($val);
$filePointer = fopen($tmpFile, "w");
curl_setopt($curlHandle, CURLOPT_FILE, $filePointer);
curl_exec($curlHandle);
curl_close($curlHandle);
fclose($filePointer);
$linesArr = file($tmpFile);
foreach($linesArr as $eachLine){
echo($eachLine);
}
?>
I don't know why this code is not working. Can someone help me