HOW TO: Creating a Who is Online script with PHP

In this tutorial I will show you how to create your own "Who’s Online" script, which is app.pngoften found on message boards and other community scripts. We will first create a really simple script, and after that add a few more features like the location of each visitor. But first, let me explain how our "Who’s Online" script is going to work.

Our script will store a visitor’s IP address and last active timestamp in a database, and update it every time the visitor requests one of our pages. The script will actually be a web bug, and run completely in the background. If you want to know more about web bugs, have a look at this SitePoint Blog entry by Harry Fuecks, but in a nut shell it’s a small 1×1 image that actually executes PHP, and returns an image. PHPit - Totally PHP » Creating a “Who’s Online” script with PHP

Most Popular Posts

Comments are closed.