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?
For session management(login) in php3 try PHPLIB
http://www.phpbuilder.com also has a tutorial on using that lib. but after reading it, I decided to find a host with php4 :)
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...