Help with this users online script

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
john
Forum Newbie
Posts: 3
Joined: Sun Feb 16, 2003 4:22 pm

Help with this users online script

Post by john »

Hi , i hope you or someone can help me out here.
I've downloaded a script from phpclasses.org and its a users online script.
it doesnt seems to be difficult to set up.
But was my intention to put the script in the directory of a chat thing i have on my website and use a kind of a include to be viewed on the index page so vistors can see if there's someone in the chat.
So i put the whole script in the chat directory and the rest you can guess.
But looking at it , it sats 1 user online but infact no one is online.
But for some strange reason it can see me feel me or whatever the problem is.
The script i used in at [http://www.phpclasses.org/goto/browse.h ... /1246.html]
Hope someone can tell me what i'm doing wrong.

John[/url]
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

Post by lazy_yogi »

So i put the whole script in the chat directory and the rest you can guess.
But looking at it , it sats 1 user online but infact no one is online.
There is someone online when you open it in the browser ... it is you
john
Forum Newbie
Posts: 3
Joined: Sun Feb 16, 2003 4:22 pm

Post by john »

Well it should count me at all cause i didnt entered that part of the site.
So what do i do if i want to show visitors the status of people in the chatroom ?
There must be a way to show that on the index page ?
any ideas someone ?

John
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

Post by lazy_yogi »

ohh ... I get what your saying now

you need to just get (probably copy) part of the usersonline script into another file. The part that does *NOT* update the storage of information on who is online. Only the bits that just display the info.

The usersonline script gets info when ppl run the script and adds that info to the info kept in a file or database about who is online.

So you need the copy that usersonline script and remove the updating part and just leave in the reading part. And put THIS on the index.php page and leave the other one on the chat room script
john
Forum Newbie
Posts: 3
Joined: Sun Feb 16, 2003 4:22 pm

Post by john »

Well its an idea i guess.
Can try that, maybe that works..


Give it a try thanx

John
Post Reply