Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3172 → Rev 3173

/web/still_connected.php
3,6 → 3,10
// store user @IP who can join this page (still have their status.php tab open) in a file.
$filename = '/tmp/current_users.txt';
$user_ip = $_SERVER['REMOTE_ADDR'];
if (!filter_var($user_ip, FILTER_VALIDATE_IP)){
echo "<b>invalide @IP</b><br />\n";
exit();
}
 
$isConnected = exec('sudo /usr/sbin/chilli_query list | awk '.escapeshellarg('($2 == "'.$user_ip.'") {print $5}'));
if ($isConnected === '0') {