21,886
社区成员
发帖
与我相关
我的任务
分享
function cut($file,$from,$end,$num=1){
$message=explode($from,$file);
$message=explode($end,$message[$num]);
return $message[0];
}
$str=cut($str,"Transfer-Encoding: chunked
","
HTTP/1.1 400 Bad Request");
echo $str;
$str="";
$fp = fsockopen("ask.39.net", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET /question/10819414.html HTTP/1.1\r\n";
$out .= "Accept: application/x-shockwave-flash, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*/\r\n";
$out.="Accept-Language: zh-cn\r\n";
$out.="Accept-Encoding: gzip,deflate\r\n";
$out.="User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)\r\n";
$out .= "Host: ask.39.net\r\n";
// $out.="Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7\r\n";
//$out.="Keep-Alive: 300\r\n";
$out.="Connection: keep-alive\r\n";
$out .= "Cookie: onlineId=5347153279694344113; ip_to_city=%BD%AD%CE%F7%CA%A1%B8%D3%D6%DD%CA%D0+%B5%E7%D0%C5; __utma=56571124.2013124916.1279761358.1279761358.1279761358.1; __utmb=56571124.3.10.1279761358; __utmz=56571124.1279761358.1.1.utmcsr=baidu|utmccn=(organic)|utmcmd=organic|utmctr=39; online_bbs=4799118517545223018; laston_bbs=634153871235869750; Hm_lvt_e517564e98c2825803fdf00b6c0d9ee7=1279761404390; Hm_lvt_1827105cf5cfac624c8dbf5159abfdb4=1279761721875\r\n\r\n";
$out.="Cache-Control: max-age=0\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
$str.=fgets($fp, 128);
//echo $str;
}
fclose($fp);
}
echo $str;
function cut($file,$from,$end,$num=1){
$message=explode($from,$file);
$message=explode($end,$message[$num]);
return $message[0];
}
$str=cut($str,"X-UA-Compatible: IE=EmulateIE7","
HTTP/1.1 400 Bad Request");
echo $str;