Forum Moderators: coopster

Message Too Old, No Replies

Making a "count users online" script.

I don't know where to start..

         

I Will Make It

10:17 pm on May 1, 2006 (gmt 0)

10+ Year Member



Should this be done by getting values from a session, or is fine to use mysql db's to do this?

I'm a newbie to php, so if anyone has some good articles or whatever, feel free to post the url's for those here ;)

Even better: Post the entire code :D

best regards

hakre

10:23 am on May 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



or even better: search the web for a "who is online" service .

barns101

11:15 am on May 2, 2006 (gmt 0)

10+ Year Member



phpBB [phpbb.com] has a who's online feature so you could take a look at the source.

Matt Probert

1:37 pm on May 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On a Linux web server you can issue the following command to the shell:

netstat -na ¦ grep ^tcp ¦ wc -l

If you echo the ouput to a file you can then read it in, and display it within a formatted HTML page.

Matt

I Will Make It

3:43 pm on May 2, 2006 (gmt 0)

10+ Year Member



thank you!

I think I'll check the phpBB forum :)
That's exactly what I was looking for.

I have googled on "users online script php" but all of them are from sites like hotscript and so, and those scripts are always like 5-10 files long, and contains all this extra functions that nobody really needs.