Eye on Presque Isle
Image updated every 15 seconds!
|
||
Business Member Directory Events Guest Book Jobs News Contact Us Discussions Old Photos |
Camera View:   S. Main | N. Main | N. Main (streaming) | Scenic
Please Sign our GuestBook! View Last 6 Images |
** ################################################################################################# # # Project : phpUseronline # File name : useronline.php # Version : 1.20 # Last Modified By : Erich Fuchs # e-mail : office@smartisoft.com # Purpose : Main File # ################################################################################################# # Configuration ################################################################################################# $server = "localhost"; // Your mySQL Server, most cases "localhost" $db_user = "phpusersonline"; // Your mySQL Username $db_pass = "Svenska"; // Your mySQL Password $database = "phpusersonline"; // Database Name $timeoutseconds = 300; // timeout value in seconds # End Configuration - DO NOT EDIT BEHIND THIS LINE !!! ################################################################################################# $timestamp=time(); $timeout=$timestamp-$timeoutseconds; mysql_connect($server, $db_user, $db_pass) or die ("Useronline Database CONNECT Error"); mysql_db_query($database, "INSERT INTO useronline VALUES ('$timestamp','$REMOTE_ADDR','$PHP_SELF')") or die("Useronline Database INSERT Error"); mysql_db_query($database, "DELETE FROM useronline WHERE timestamp<$timeout") or die("Useronline Database DELETE Error"); $result=mysql_db_query($database, "SELECT DISTINCT ip FROM useronline WHERE file='$PHP_SELF'") or die("Useronline Database SELECT Error"); $user =mysql_num_rows($result); mysql_close(); if ($user==1) {echo"$user Viewer online";} else {echo"$user Viewers online";} ?> ** |
11/22/2003 - Member Chat Board added!
Hits Since March 13,2002
|