<?php
$url = "http://www.java2java.com/index.htm";
$options = array ("http" => 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 );
}
?>
|