Tokiwa Battle Royale
GE777
A PHP Battle Royale inspired game
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
stat.php
Go to the documentation of this file.
1
<?php
2
3
define(
'CURSCRIPT'
,
'stat'
);
4
5
require
'./include/common.inc.php'
;
6
7
$k
=(int)$_GET[
'lim'
];
8
9
$result
=
$db
->query(
"SELECT ip FROM {$tablepre}users WHERE lastgame>='$k'"
);
10
11
$cnt
=0;
12
13
while
($dat =
$db
->fetch_array(
$result
))
14
{
15
$data=$dat[
'ip'
];
16
$i
=strlen($data)-1;
17
while
(
$i
>=0 && $data[
$i
]!=
'.'
)
$i
--;
18
if
(
$i
<0) echo
"something wrong.."
;
19
$data=substr($data,0,
$i
);
20
//echo $data."<br>";
21
if
(!isset($hash[$data])) { $hash[$data]=1;
$cnt
++; }
22
}
23
24
echo
$cnt
;
25
26
?>
$cnt
$cnt
Definition:
stat.php:11
$i
$i
Definition:
botservice.php:267
$db
$db
Definition:
clear.php:32
$result
$result
Definition:
stat.php:9
$k
$k
Definition:
stat.php:7
stat.php
Generated on Thu Nov 20 2014 11:38:04 for Tokiwa Battle Royale by
1.8.8