Script Wanted

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Yegor
Forum Newbie
Posts: 14
Joined: Mon Jul 15, 2002 5:48 pm

Script Wanted

Post by Yegor »

Hi! I was wondering if anyone can suggest me a good *WORKING* users online script. Its simple, I just need to include it into my main page, and I want it to show how many users are viewing this page at the moment, thats all. It needs to be very dynamic, so when the person leaves, the numbers change. because I got a really slow one from phponline.biz
Can anyone suggest me a good, simple script?
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

http://www.hotscripts.com

it has a whole section on it..
Yegor
Forum Newbie
Posts: 14
Joined: Mon Jul 15, 2002 5:48 pm

Post by Yegor »

Don't U think I looked there already?
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

HEY!!!

Post by AVATAr »

HEY!... we are trying to help.. but if u want to learn just read and dont be so rude :?

this forum is not a: "I Need a script" forum... here you can learn.. as i do, but not that way :!:
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Re: Script Wanted

Post by jason »

Yegor wrote:Hi! I was wondering if anyone can suggest me a good *WORKING* users online script. Its simple, I just need to include it into my main page, and I want it to show how many users are viewing this page at the moment, thats all. It needs to be very dynamic, so when the person leaves, the numbers change. because I got a really slow one from phponline.biz
Can anyone suggest me a good, simple script?
They dont' exist. They are really easy to do though.

Simply create a session for each person that goes on the site, and store that session in a database. Then, as the person goes through the site, you update the database with a last_impression. To display the number of users on the site, simply count the total number of sessions in the table that have a last_impression time of less than x number of minutes.
dusty
Forum Contributor
Posts: 122
Joined: Sun Apr 28, 2002 9:52 pm
Location: Portsmouth, VA

Post by dusty »

User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Yeah just make it yourself. Create a entry in database everytime user visits the site and update it when user clicks one of the links... (don't forget to set the timeout though...)
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

dusty wrote:must have not looked too hard

http://www.hotscripts.com/PHP/Scripts_a ... Real-Time/
exactly what i was pointing for, but i thought he could find it without me pointing the whole URL
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

lol -> may be he went to ASP section?
Post Reply