i have a problem with a URL it was working fine before 2-3hours now stopped working when i use that on another server it seems working again in this stopped working i tried curl no chance failed let me know there is any other way to get that
this is error
Warning: file_get_contents(http://#.#.#/?id=100) [function.file-get-contents]: failed to open stream: HTTP request failed! in
Check whether they are blocking your IP address.
It could be that you need to set headers, some sites don't allow you to view them without, try this:
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en
" .
"Cookie: foo=bar
" .
"User-Agent:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
"
)
);
$context = stream_context_create($opts);
$html = file_get_contents($url, false, $context);