RSS
30 Mar 2001

Currently Online, how does that work?

Author: admin | Filed under: Salted Wound

I have had a few people ask me how I got that “currently online” thing on the bottom left of my page. As you can tell by all of my links, this site is entirely powered by PHP. I use a MySQL database to store all of my info, posts, links, boxes, session and cookie info, everything. For the Currently online box I made a table that is populated with IP addresses and the time the address was added. When anyone loads a page from my site I gather their IP address from the Header information and place it in the table. Then a little script looks to see how old the IP address is. If it is older than 10 minutes it deletes it. Then a simple record count of the table gives you the number of unique visitors in the past 10 minutes. It’s nothing special.

3 Responses to “Currently Online, how does that work?”

  1. Anonymous says:
  2. Damn you smart boy.

  3. Anonymous says:
  4. That is why I am in love with that sexy bitch.

    –Girl of your dreams … ;p

  5. :)

Leave a Reply