$conn=mysql_connect("localhost","chrisv","crc123!") or die ("can't connect to server"); mysql_select_db("hard") or die ("can't select database"); // how long you want before a guest is inactive. // I set it to 300 secs (5mins) $info[life] = 600; // Do not edit below, unless you know how too $info[table] = 'whos_online'; $info[ip] = $REMOTE_ADDR; $info[time] = time(); $info[time_work] = $info[time] - $info[life]; mysql_query("delete from $info[table] where time < '$info[time_work]'"); $check = mysql_fetch_array(mysql_query("select * from $info[table] where ip = '$info[ip]'")); if($check) { mysql_query("update $info[table] set time = '$info[time]' where ip = '$info[ip]'"); } else { mysql_query("insert into $info[table](ip,time) values('$info[ip]','$info[time]')"); } ?>
|
||||||||||
| |
||||||||||
|
Tune into our Free Streams Here: |
||||||||||||||||||||
|
|||||||||||||||||||||
|