Jump to content

i cant read this file


if

Recommended Posts

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.