SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2000
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    After reading the excellent php tutorial I have a basic idea of what it's all about. I would like now to build a site with login/password and instant messaging capabilities.

    How is password login achieved using php3 only?. I read the thread at the bottom of the section but that was for php4.

    Are there any good tutorials for login and instant messaging using php? Or a standard script I can use?

    thanks,

    SpM

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For session management(login) in php3 try PHPLIB

    http://phplib.netuse.de
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.phpbuilder.com also has a tutorial on using that lib. but after reading it, I decided to find a host with php4
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  4. #4
    SitePoint Zealot
    Join Date
    Nov 1999
    Location
    Manhattan!
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is fairly easy to propagate a session id through your php pages and then check if the session is current. I.e.

    When a user logs in use the micro time function to generate a unique session id. Then insert the session id into your database along with a time stamp. I used to use time()+1800 to make the session valid for half hour.

    Then, on ALL LINKS, propagete the id.

    On the top of each page that is protected, first check that the session id exist. If it does not exist, use the header() function to send them to the login page. If the session id does exist, get the time stamp from the database and check that time() < timestamp. If not, then the session has timed out.

    Also remember to update the timestamp as the user moves from page to page.

    This simple way gives you a lot of option, since you can store all kinds of interesting stuff in your session table...

    Christian
    www.Christian.Reimer.com
    A personal website exploring the mental summersaults,
    odd occurrences and political powerplays in the land of me.


Bookmarks

Posting Permissions

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