I need to get webpage's content ,I cant use Curl as it is not enabled.I tried the below code But it is not working.
$opts = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"Cookie: foo=bar\r\n"
)
);
$context = stream_context_create($opts);
$fp = fopen($_GET['url'], 'r', false, $context);
if($fp)
fpassthru($fp);
fclose($fp);
exit;
The code produce an error
Warning: fopen(http://www.google.com/search?&q=site:www.myspace.com+-intitle:MySpaceTV+%22Todd Terje%22) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request