#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    8
    Rep Power
    0

    Using script to access password page


    I would like to make my script access a password protected page for me and use CookieClient to save the cookies so next time I use it I would already be logged in. How would i do this?
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    Whatever the language is you are using (python, perl or php etc)...

    Your code would read the CGI environment variables and check the the existance of the cookie.

    If the cookie exists you print out the logged in page (or redirect to the logged in page).

    If the cookie is not there then you print the login page.

    Some useful links:
    CGI tutorials by Google
    I liked the cookie script here:
    UG's CGI

    grim
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    8
    Rep Power
    0
    could you please show me some sample code?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Location
    Cape Town, South Africa
    Posts
    131
    Rep Power
    13
    Did you take the time to look at those links? Everything you need is there.

    Sample code:

    Code:
    #some sample code
    print 'check out the links...'
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    8
    Rep Power
    0
    Oh sorry didnt see those

IMN logo majestic logo threadwatch logo seochat tools logo