Here I am

chat question...?

Attention: TDR Forum Junkies
To the point: Click this link and check out the Front Page News story(ies) where we are tracking the introduction of the 2025 Ram HD trucks.

Thanks, TDR Staff

Bateries Optima

Archive Question...

Admin,



I was wondering if it would be possible to write up some type of code to see how many chatters are in the chat room from the Discussion Forums page? I think this would be neat, and it has poped up before in the chat about something like this before.



Look at N. W. BOMBers for an example to what I am trying to explain.



Just wondering,

Andrew
 
Originally posted by TxDieselKid

Admin,



I was wondering if it would be possible to write up some type of code to see how many chatters are in the chat room from the Discussion Forums page?



It should be truly trivial to do. Have a CGI script do:

CHATTERS=`ps -ef | grep naken | grep -v grep | wc -l`

CHATTERS=`expr $CHATTERS - 1`

echo "<html>

echo "Current # of chatters: $CHATTERS"

echo </html>



Subtract 1 because there's a thread for each user plus the main thread.



Finding out *who* is chatting would be a trifle more difficult, but not impossible.



Fest3er
 
Simple... yes, and somewhat.

Well, it depends... .



Getting the count is simple from a script. With HTML, simply put in a Server Side Include. However, you can't execute SSI though PHP, at least not with Apache 1. x (2. x will let a script feed output to another).



I'm putting together the PHP code to handle it.....
 
MAN! after reading all that my brain exploded!:eek: trying to process what all that meant. If you find some of the pieces just E-mail them back to me. :D :D :p
 
Back
Top