- 论坛徽章:
- 0
|
<?php
if ( ( $io = fsockopen( "haoting.com", 80, $errno, $errstr, 30 ) ) !== false )
{
$send = "GET / HTTP/1.1\r\n";
$send .= "Host: haoting.com\r\n";
$send .= "User-Agent:\r\n";
$send .= "Referer: haoting.com/\r\n";
$send .= "Accept: ";
$send .= "text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,";
$send .= "image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1\r\n";
$send .="Accept: text/xml,application/xml,application/xhtml+xml,";
$send .= "Accept-Language: en-us, en;q=0.50\r\n";
$send .= "Accept-Encoding: gzip, deflate, compress;q=0.9\r\n";
$send .= "Connection: Close\r\n\r\n";
fwrite( $io, $send );
$send = '';
do
{
$send .= fgets ( $io, 4096 );
} while ( strpos ( $send, "\r\n\r\n" ) === false );
$info = $send ;
$send = '';
while ( ! feof ( $io ) )
{
$send .= fread ( $io, 8192 );
}
fclose ( $io );
echo '<h3>Header Array</h3>';
echo '<pre>';
print_r ( $info );
echo '</pre>';
echo '<h3>Document Body</h3>';
echo $send;
}
?>
也是没办法获取到
viewpage看到的cookie
已经试过n遍 |
|