PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 23rd, 2003, 08:35 PM
phamous phamous is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: charlotte, NC, USA
Posts: 1 phamous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to phamous Send a message via Yahoo to phamous
User Online Count

I'm on Mac OSX system, PHP 4:

If anyone knows of where i can get a tutorial on "counting the users currently on my site?" using php, and/or Mysql

Thank you.

Reply With Quote
  #2  
Old April 24th, 2003, 12:59 AM
mugane mugane is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Charlottesville, VA USA
Posts: 425 mugane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to mugane Send a message via Yahoo to mugane
RE: User Online Count

Frankly, I don't see how it can be done unless you are trying to count the number of users that have logged in. If you simply want to count the number of surfers that have your site in an open window it is not really possible, because once the user's browser loads the page you really have no way to tell that it is still open. If you want to count the number of requests for your page and then display the ones that requested it recently (within a given time period), use the $_SERVER[$REMOTE_ADDR] variable.


Reply With Quote
  #3  
Old April 24th, 2003, 01:01 AM
mugane mugane is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Charlottesville, VA USA
Posts: 425 mugane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to mugane Send a message via Yahoo to mugane
RE: User Online Count

Oh, you may also try and use the onblur() event handler to submit a hidden form that indicates that the browser is not in use, but I am not sure if this will work very well. Check out other javascript event handlers.

Reply With Quote
  #4  
Old February 17th, 2004, 02:39 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: User Online Count

if you are using asp you can use a global.asa
like below
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

SUB Application_OnStart

Application("ActiveUsers") = 0

END SUB

Sub Session_OnStart

Session.Timeout = 1
'Session("Start") = Now


Application.Lock
Application("ActiveUsers") = Application("ActiveUsers") + 1
Application.UnLock

End Sub


Sub Session_OnEnd
Application.Lock
Application("ActiveUsers") = 0
Application.UnLock
End Sub

</SCRIPT>
but i dont know how it is done in php if you find out let me know
anthonym@gledhill.net ok

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > User Online Count


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway