PDA

Click to See Complete Forum and Search --> : cookies


louby
Feb 14th, 2001, 10:14 AM
i have to get the cookie value from the HTTP response sent to you by
the server.
And i have to set the cookie value for all http requests you send to the server

in vb or asp

please help

JoshT
Feb 19th, 2001, 08:11 AM
Look into Response.Cookies and Request.Cookies.

Josh

gr8tango
Jan 17th, 2002, 07:24 PM
I'm using a vb app to login, get a cookie from the server, then send more data to the server (form data and files). The site requires login, but I don't want to continually send my user and password. Instead, if I send a cookie for the session, I can remain valid in the server's session table.

I get the cookie using:

Private Sub web1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is web1.Object) Then
Debug.Print "Web document is finished downloading"
txtCK.Text = web1.Document.cookie
Dim cook, st1 As String
Dim cklngth, ck2 As Integer
cook = txtCK.Text
End If

Which displays the cookie in the text box txtCK. I can use the cookie to send more form data, but when I try to send multi-part form data (form data and a file) I cannot get past the login screen. I think I need help on building the POST string and the exact location and syntax of the cookie info.