To calculate the number of people currently viewing a page is a little tricky. You could get the exact number with an AJAX function that monitored your user and continually corresponded with a script and stored the information.
If you don't know AJAX you can do something like create a database that stores the IP, time stamp, and URI then display the count for the last 5-10 minutes.
This is a bit from a code I have been using for a certain website for about a month now. It has been working fine until today I noticed it displayed the else statement for articles that where edited today (September 10th, 2007). I've been playing around with it trying to fix this, and haven't had any success - but I can simply cannot understand why it is doing this. I alos noticed it will repeat this for tomorrow and the day after. Any thoughts? THANKS!
$query = "SELECT *, DATE_FORMAT(last_edit, '%M %D, %Y') as last_edit FROM database WHERE `page_name` like '$page_name' AND `side` LIKE 'l' AND `position` > 0 ORDER BY `position`";