本帖最后由 gto250 于 2012-5-30 21:50 编辑
$s=get("http://www.wyqx.gov.cn/" )
MsgBox(0,"",$s)
Func get($url)
$oHTTP = ObjCreate("Microsoft.XMLHTTP")
$oHTTP.Open ("Get",$url,False)
$oHTTP.SetRequestHeader ("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
$oHTTP.SetRequestHeader ("Accept-Encoding","gzip, deflate")
$oHTTP.SetRequestHeader ("Accept-Language","zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3")
$oHTTP.SetRequestHeader ("Cache-Control","max-age=0")
$oHTTP.SetRequestHeader ("Connection","keep-alive")
$oHTTP.SetRequestHeader ("Host","www.wyqx.gov.cn")
$oHTTP.SetRequestHeader ("User-Agent","Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0")
$oHTTP.SetRequestHeader ("Refer","www.wyqx.gov.cn")
$oHTTP.SetRequestHeader ("Cookie"," ASPSESSIONIDQCSATCBA=AHPOHPDCHOAFLOILHNKPDBJJ")
$oHTTP.Send ()
$post=$oHTTP.Responsebody
Return $post
Endfunc
以上代码抓取http://www.wyqx.gov.cn/这个网站的内容不成功,用InetRead也不行
但是用浏览器就能打开网页,真变态的网站
哪位兄弟能帮帮忙 |