forked from halo-battle/game
Version 0.9a
This commit is contained in:
parent
d5c122a2c5
commit
59fbc7104e
141 changed files with 8686 additions and 1156 deletions
|
|
@ -52,9 +52,14 @@ if (!isset($_SESSION) || $_SESSION['timestamp'] + 1200 < time()) {
|
|||
exit;
|
||||
}
|
||||
|
||||
/*// Fait patienter l'utilisateur s'il a fait une réquête il y a moins de deux secondes
|
||||
if (!isset($_SESSION['microtimestamp']) || time()+microtime() - $_SESSION['microtimestamp'] < 1.5) {
|
||||
usleep((1.5-(time()+microtime() - $_SESSION['microtimestamp']))*1000000);
|
||||
}*/
|
||||
|
||||
// Vérification que la requête proviennent du serveur
|
||||
if (!isset($_SERVER['HTTP_REFERER'])) $_SERVER['HTTP_REFERER'] = '';
|
||||
if (!ereg(time().'http://127.0.0.1/', time().$_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != '') {
|
||||
if (!ereg(time().'http://127.0.0.1/', time().$_SERVER['HTTP_REFERER']) && !ereg(time().'http://confrerienoire.no-ip.org/', time().$_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != '') {
|
||||
//if (!ereg(time().'http://battle.halo.fr/', time().$_SERVER['HTTP_REFERER']) && !ereg(time().'http://www.battle.halo.fr/', time().$_SERVER['HTTP_REFERER']) && !ereg(time().'http://www.halo2.fr/', time().$_SERVER['HTTP_REFERER']) && !ereg(time().'http://ligue.halo.fr/', time().$_SERVER['HTTP_REFERER']) && !ereg(time().'http://halo-game.com/', time().$_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] != '') {
|
||||
setHistorique('Requête depuis une adresse non officiel', 'Par mesure de sécurité, la requête de '.$_SESSION['id'].' a été annulée car l\'\'adresse de provenance ne correspond pas à celle du site : '.$_SERVER['HTTP_REFERER']);
|
||||
session_destroy();
|
||||
|
|
@ -64,5 +69,6 @@ if (!ereg(time().'http://127.0.0.1/', time().$_SERVER['HTTP_REFERER']) && $_SERV
|
|||
}
|
||||
|
||||
$_SESSION['timestamp'] = time();
|
||||
$_SESSION['microtimestamp'] = time()+microtime();
|
||||
mysql_close();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue