hipokrasi Posted August 29, 2010 Posted August 29, 2010 Hello, tried to get headers by using this code shown below, but it only gets reponse body. How can I get headers too? Thanks... Func _SendGet3($ID, $PHPSESSID1,$PHPSESSID2) With $oHTTP .Open('GET', '.'&$ID, False) .SetRequestHeader('Accept', '*/*') .SetRequestHeader('Referer', '.') .SetRequestHeader('Accept-Language', 'tr-TR') .SetRequestHeader('User-Agent', 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; eBook; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)') .SetRequestHeader('Accept-Encoding', 'gzip,deflate') .SetRequestHeader('Host', '.') .SetRequestHeader('Connection', 'Keep-Alive') .SetRequestHeader('Cookie', $PHPSESSID1 & '' & $PHPSESSID2) .Send() EndWith ;use the ADO-DB Object to write the data of the HTTP Response With $oDATA .Type=1 .Open .Write($oHTTP.ResponseBody) .SaveToFile(@ScriptDir&'\captcha.JPG', 2) .Close EndWith EndFunc
PsaltyDS Posted August 30, 2010 Posted August 30, 2010 (edited) Maybe by $oHTTP.GetAllResponseHeaders()? (Must be done after the Send, of course.) Edited August 30, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
hipokrasi Posted August 30, 2010 Author Posted August 30, 2010 Maybe by $oHTTP.GetAllResponseHeaders()? (Must be done after the Send, of course.)thanks gonna check it
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now