HY This is a piece of a online user php. The count goes +1 if a visitor connect to the website. I want the counter goes +4 when one visitor is online . When number 2 is online ithe counter goes +8 . The third is online goes + 16 and further ..., 4 gives 32, 5 give 64 .... example visitor 1 ONLINE SHOWS 4 visitor 2 ONLINE SHOWS 12 visitor 3 ONLINE SHOWS 28 visitor 4 ONLINE SHOWS 32 visitor 5 ONLINE SHOWS 64 etc.......... .... HELP WANTED FROM A PHP FREAK QUICKLY !! THX DUDE //Fetch Time $timestamp = time(); $timeout = $timestamp - $timeoutseconds; //Insert User $insert = mysql_db_query($database, "INSERT INTO $table VALUES ('$timestamp','$REMOTE_ADDR','$PHP_SELF')") or die("Failed!"); //Delete User $delete = mysql_db_query($database, "DELETE FROM $table WHERE timestamp<$timeout") or die("Failed!"); //Fetch Users Online $result = mysql_db_query($database, "SELECT DISTINCT ip FROM $table WHERE file='$PHP_SELF'") or die("Failed!"); $users = mysql_num_rows($result); //spit out the results if($users == 1) { print("Online users : $users\n"); } else { print("Online users : $users\n"); }
In otherwords you want to pretend there's an exponential number of people online to what there actually is? lol Well, firstly from the numbers you gave there is no unique pattern to what you're wanting to show as you start off with 2(x-1)+4 and then break off into some other formula which makes no sense. Try $displayusers = (2*($users-1))+4; By the way, do you really expect to get any help when you say you need help from "freaks"?
lol I think you're right Dejavu. Although he'd have to ask Perl or htaccess questions to get help from Nintendo.