Jump to content

Recommended Posts

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...