Results 1 to 3 of 3

Thread: cookies

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Posts
    33
    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

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Look into Response.Cookies and Request.Cookies.

    Josh
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    gr8tango
    Guest
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width