Results 1 to 3 of 3

Thread: Auto log-in and Cookies

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37

    Question

    What code should I use so that a registered user can automatically log-in without typing his username and password again?

  2. #2
    ines
    Guest
    you can write a cookie first time he logs in. Next time you first check the cookie, if it's not there you send him to the login page, if not he's logged in automatically.

    You might want to ask the user if he wants to log in automatically at his next visit, cause in case that person is sharing his computer, he might prefer to log in at every visit.

    hope this helped!
    if you want more details let me know, I could send you some code.

  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