http://rss.imageshack.us/user/NilsPetter13/images/rss
ive tried curl and file_get_contents but still no luck
i can browse that page using browser but when i read the file using php this is no longer giving me any ouput
<?php
error_reporting(E_ALL);
ini_set('reporting_errors',1);
// spoofing FireFox 2.0
$useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";
$str = array(
"Accept-Language: en-us,en;q=0.5",
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7",
"Keep-Alive: 300",
"Connection: keep-alive"
);
$ch = curl_init();
// set user agent
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_HTTPHEADER, $str);
curl_setopt($ch, CURLOPT_REFERER, "");
curl_setopt($ch, CURLOPT_URL, "http://rss.imageshack.us/user/NilsPetter13/images/rss");
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>
this is also not working
$url = 'http://rss.imageshack.us/user/NilsPetter13/images/rss';
echo file_get_contents($url);
print_r(file($url));
please help