Jump to content

Get Header / User string agent


MyEarth
 Share

Recommended Posts

Hello guys,

I have searching around and i have found only way to set custom user agent, accept language etc. but not how to get it

I want to retriive ALL of this information:

GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive
Host: microsoft.com

This is the script i have tried but not give me the Accept encodind, accept language , user strings etc.

$URL = "http://www.microsoft.com"
$objHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$objHTTP.Open("HEAD", $URL, False)
$objHTTP.Send("")
$headers = $objHTTP.getAllResponseHeaders
ConsoleWrite($headers)

Thnaks

Edited by MyEarth
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...