Mega Code Archive
Calling fopen() with a Context Resource
array ("user_agent" => "php24-test-script", "header" => "referer: http://www.example.com/index.html\r\n" ) );
$context = stream_context_create ( $options );
$res = fopen ( $url, 'r', 0, $context ) or die ( "could not open page" );
while ( ! feof ( $res ) ) {
print fgets ( $res, 1024 );
}
?>