CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
users online script wanted

 



1user
Novice

May 15, 2001, 4:58 PM

Post #1 of 5 (3004 views)
users online script wanted Can't Post

Where and what is the script that some sites use that say "you are one user of X currently browsing"

I have looked high and dry for a script like this and can't find one. Are these sites just bulling and that html'd in their page or is there a script out there that shows users online in real time???



randor
User

May 16, 2001, 7:14 AM

Post #2 of 5 (2998 views)
Re: users online script wanted [In reply to] Can't Post

as far as i know it is not possible to do such a thing in perl, the best solution would be to use cookies in perl, but even then you could not be that accurate.

you might want to look into a javascript program, it seems i remember some function that can be used to alert a script when someone closes the window, which in theory might work, but unfortunatly my javascript is just not that good.

hope this helps.



Jasmine
Administrator

May 16, 2001, 8:07 AM

Post #3 of 5 (2996 views)
Re: users online script wanted [In reply to] Can't Post

Actually, it is doable ( and quite simple ) in Perl.

Log the users by IP and time

Count the last x users that have been on the site during the last 5 minutes or so ( and take a moment to throw away old log lines )

Display the count.

I'm in the middle of a project right now, or I would have just done it. Perhaps someone else can write the program...?



randor
User

May 16, 2001, 8:14 AM

Post #4 of 5 (2995 views)
Re: users online script wanted [In reply to] Can't Post

yes, but the problem with that is that say you have a site where users are only there a short period of time, if you get 500 hits in 5 minutes, but 380 of them leave within 30 seconds, then your "count" is off by 380, i dont see that as a reliable way of doing it, i believe that for my money i would want more accuracy, so i do stand by my words, but i also understand that for some projects this accuracy is not nessesary, so i do understand your thoughts also.

Randor



1user
Novice

May 16, 2001, 9:05 PM

Post #5 of 5 (2983 views)
Re: users online script wanted [In reply to] Can't Post

The sites I've been to if go back and forth thru their pages the counts different each time.

I think there is a php script out there that does this, but how would I be able to call it from a .shtml page?
Is there an extension that will call both php and cgi?




 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives