/* Start the session */ session_start(); /* Define how long the maximum amount of time the session can be inactive. */ define("MAX_IDLE_TIME", 3); function getOnlineUsers(){ if ( $directory_handle = opendir( session_save_path() ) ) { $count = 0; while ( false !== ( $file = readdir( $directory_handle ) ) ) { if($file != '.' && $file != '..'){ // Comment the 'if(...){' and '}' lines if you get a significant amount of traffic if(time()- fileatime(session_save_path() . '\\' . $file) < MAX_IDLE_TIME * 60) { $count++; } } closedir($directory_handle); return $count; } else { return false; } } echo 'Number of online users: ' . getOnlineUsers() . '
'; Lords of the Battletech News
an online battletech community specializing in miniatures, mech design and tactical superiority.
Battletech Navigation


Search

Archives

Archive Summary

View by Date
View by Category



XML

News Stats

Total entries: 0
Total comments: 0
Powered by pMachine

Battletech News

Random Battletech Photo






What to do?

Join our community forum
Browse the
gallery
Get Painting
Get Playing
Come back and check the news