想写一个小偷程序,无奈不会js。。
http://book.zhuike.net/qihuan/158/4943711.htm这个页面的文字的源文件应该是http://r.wl01.com:88/novel/1/158/4943711.txt
可是直接访问源文件就会提示document.writeln("<h1>本站已关闭
有没有什么方法破解??
真心谢谢了
------解决方案--------------------
....我用.net的,你要我给你php,试试下面的代码吧
function get_html($url, $host){
$fp = fsockopen($host, 80) or die("Open ". $url ." failed");
$header = "GET /".$url ." HTTP/1.1\r\n";
$header .= "Accept: */*\r\n";
$header .= "Accept-Language: zh-cn\r\n";
$header .= "Accept-Encoding: gzip, deflate\r\n";
$header .= "Referer:http://book.zhuike.net\r\n";
$header .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; InfoPath.1; .NET CLR 2.0.50727)\r\n";
$header .= "Host: ". $host ."\r\n";
$header .= "Connection: Keep-Alive\r\n";
//$header .= "Cookie: cnzz02=2; rtime=1; ltime=1148456424859; cnzz_eid=56601755-\r\n\r\n";
$header .= "Connection: Close\r\n\r\n";
fwrite($fp, $header);
while (!feof($fp)) {
$contents .= fgets($fp, 8192);
}
fclose($fp);
return $contents;
}