Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Users Conected to Server?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,
I know that there's a way in NT Server (ASP) to place the number of users conected to the site.
I want to do this in my site that is on unix/php3
If someone knows, please help me.

Thanks,
Guillermo
 
I apologize if I am getting too basic, here, since i don't know your knowledge level.

The only real way to do this is to use sessions. Since http is a stateless protocol, a 'connection' is a meaningless thing. Someone is connected only as long as they are downloading a page, but to the server, once they have downloaded the page and are sitting there reading it for 5 minutes, they are disconnected.

The sessions solution is a workaround that saves a unique identifier as a cookie to each browser visiting the site, which the server tracks, saving information on the server-side, thus giving you the ability to know how long a specific person has been moving around in your site. You can specify timeouts for inactivity, etc... This is how ASP maintains that information on the server side. Not being too familiar with ASP, I don't know how much the programmer is shielded from the implementation of sessions.

PHP4 has sessions built in, and you can track users with a few simple functions. For sessions on PHP3, you need a few additional classes that have been put together called PHPlib, available at [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top