Here is my code, remember to add the db by yourself.
Hope it'd help you out
function online() {
$ip = getenv("REMOTE_ADDR");
$past = time()-900;
mysql_query("DELETE FROM session WHERE time < $past");
$result = mysql_query("SELECT time FROM session WHERE...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.