Jump to content

Help with winhttp.winhttprequest Object


oren
 Share

Recommended Posts

Hello

I'm just started with the winhttprequest object and objects in general..

I have a question.. When i finish sending a Send() request to the Object i opend..

And then i make a GetResponseHeader("Set-Cookie") Command... I receive only one Cookie value

But when i do GetAllResponseHeaders() i see that there a 3 values to Set-Cookie..

Maybe some code will make it more readable..

Global $WinHttp=ObjCreate("winhttp.winhttprequest.5.1")
$WinHttp.open("GET",'http://DomainName/ucp.php')
$WinHttp.Send("mode=login")
ConsoleWrite("1"&@lf)
ConsoleWrite($WinHttp.GetAllResponseHeaders())
$sOut=$WinHttp.ResponseText()
ConsoleWrite($WinHttp.GetResponseHeader("Set-Cookie"))
Exit

Now the first Consolewrite give me this...

ConsoleWrite($WinHttp.GetAllResponseHeaders())

X-Powered-By: PHP/5.2.5
Set-Cookie: phpbb3_1sd71a_u=1; expires=Fri, 18-Sep-2009 10:53:19 GMT; path=/; domain=.freepornsource.com; HttpOnly
Set-Cookie: phpbb3_1sd71a_k=; expires=Fri, 18-Sep-2009 10:53:19 GMT; path=/; domain=.freepornsource.com; HttpOnly
Set-Cookie: phpbb3_1sd71a_sid=b6bc98445c4e94f507ec54a874c2143d; expires=Fri, 18-Sep-2009 10:53:19 GMT; path=/; domain=.freepornsource.com; HttpOnly

And the second give me

ConsoleWrite($WinHttp.GetResponseHeader("Set-Cookie"))

phpbb3_1sd71a_u=1; expires=Fri, 18-Sep-2009 10:53:19 GMT; path=/; domain=.freepornsource.com; HttpOnly

How Do i get the hole 3 Set-Cookie headers?

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...