Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <IE.au3>
- GUICreate("Test User-Agent String", 700, 500)
- _IEErrorHandlerRegister()
- $oIE = _IECreateEmbedded()
- GUICtrlCreateObj($oIE, 10, 10, 680, 480)
- _SetUserAgent('User-Agent: đat đep trai.')
- _IENavigate($oIE, "http://www.useragentstring.com/")
- Sleep(1000)
- GUISetState()
- While GUIGetMsg() <> -3
- WEnd
- Func _SetUserAgent($agent)
- $agentLen = StringLen($agent)
- Dim $tBuff = DllStructCreate("char[" & $agentLen & "]")
- DllStructSetData($tBuff, 1, $agent)
- $chk_UrlMkSetSessionOption = DllCall("urlmon.dll", "long", "UrlMkSetSessionOption", "dword", 0x10000001, "ptr", DllStructGetPtr($tBuff), "dword", $agentLen, "dword", 0)
- EndFunc ;==>_SetUserAgent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement