Subversion Repositories ALCASAR

Rev

Rev 3173 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3173 Rev 3307
Line 1... Line 1...
1
<?php
1
<?php
2
// this script is executed by status page (controler.js) of each users
2
// this script is called by "status.php" (statusControler.js) of each connected users (every 20")
3
// store user @IP who can join this page (still have their status.php tab open) in a file.
3
// store users @IP in tmpfile
4
$filename = '/tmp/current_users.txt';
4
$filename = '/tmp/current_users.txt';
5
$user_ip = $_SERVER['REMOTE_ADDR'];
5
$user_ip = $_SERVER['REMOTE_ADDR'];
6
if (!filter_var($user_ip, FILTER_VALIDATE_IP)){
6
if (!filter_var($user_ip, FILTER_VALIDATE_IP)){
7
	echo "<b>invalide @IP</b><br />\n";
7
	echo "<b>invalide @IP</b><br />\n";
8
	exit();
8
	exit();