#include <zlib.au3>
#include <Date.au3>
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_icon=C:\WINDOWS\System32\SHELL32.dll|-18
#PRE_Outfile_x64=test.exe
#PRE_Res_requestedExecutionLevel=None
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$url = "https://www.126.com"
$oHTTP.Open("GET", $url) ;true 为异步模式
$oHTTP.setRequestHeader("Accept" , "text/html,application/xhtml+xml,image/jxr,*/*" )
$oHTTP.setRequestHeader("Accept-Language" , "zh-CN" )
$oHTTP.setRequestHeader("User-Agent" , "Mozilla/5.0(WindowsNT10.0;WOW64;Trident/7.0;rv" )
$oHTTP.setRequestHeader("Accept-Encoding" , "gzip,deflate" )
$oHTTP.setRequestHeader("Host" , "www.126.com" )
$oHTTP.setRequestHeader("Connection" , "Keep-Alive" )
$oHTTP.Send()
$binary = $oHTTP.ResponseBody
$html = BinaryToString(_ZLIB_GZUncompress($binary),4)
ConsoleWrite($html) |