Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Local $Url = "https://www.google.com.vn/"
- Local $Method = "GET"
- Local $oHTTP = ObjCreate("Winhttp.winhttprequest.5.1")
- $oHTTP.Open($Method, $Url, False)
- $oHTTP.Option(0x0028, 0x0008)
- $oHTTP.SetRequestHeader("Content-Type", "text/html; charset=UTF-8")
- $oHTTP.Send()
- _Test(BinaryToString($oHTTP.ResponseBody, 4))
- Func _Test($sData, $sFileName = "test.html", $bRun = True, $bPlainText = True)
- Local $hFile = FileOpen(@ScriptDir & "\" & $sFileName, 2 + 8 + ($bPlainText = True ? 256 : 0))
- FileWrite($hFile, $sData)
- FileClose($hFile)
- If $bRun Then ShellExecute(@ScriptDir & "\" & $sFileName)
- EndFunc ;==>_Test
Add Comment
Please, Sign In to add comment