Computing.Net > Forums > Programming > php code for no. of pple online

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

php code for no. of pple online

Reply to Message Icon

Name: jasmine tan
Date: March 11, 2006 at 07:36:23 Pacific
OS: win xp
CPU/Ram: pentium 4/512
Comment:

Hello, may I know if anyone know the PHP source code showing the number of people online?
Many thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: March 11, 2006 at 09:27:24 Pacific
Reply:

Number of people online where? I'm assuming you mean for a particular site.

There is no deafult code for for such a thing. It would depend upon how you have built your site. If you are using a content management system, such as PHPNuke, there are many plug-ins that will work with those sites.

Basically you will need to track all user activity on your site and log it to a database. You will also need to determine the amount of time that should expire before a person is considered as not being on the site. There is no way to know whaen someone has left the site or has just not clicked a new link. Well, you could put some javascript on the page to "refresh" the connection, but that would be too invasive. Then you would just do a query of the tracking database to see who is considered online.

Michael J


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: php code for no. of pple online

help - php code for e-mail www.computing.net/answers/programming/help-php-code-for-email/11565.html

Free coding for Macintosh? www.computing.net/answers/programming/free-coding-for-macintosh/13665.html

Which tool/language should i use? www.computing.net/answers/programming/which-toollanguage-should-i-use/13639.html