|
|
Custom population information |
Now you are able to get zone specific population information to your own website. Population information and statistics are almost in a realtime. Everything is updated regularly every second minute.
Here is the PHP source code which you can use to get that information what you want to your own website.
1
2
2
3
4
5
6
7
8
9
10
11
|
<?php
// Source URL (more inforamtion can be found at: https://infantry.gamespec.org/population/?view=info
// This URL should change according to it what kind of information you want to show on your website.
$path = "https://infantry.gamespec.org/population/stats.php?get=info";
$result = file_get_contents($path);
if(strlen(trim($result)) == NULL) {
echo "Unable to get information from Infantry Arena.";
}
else {
echo $result;
}
?>
|
|
|
|
Get stats ID |
Select zone which you would like to get information. Get the zone ID for it and apply the ID below guideline. Without the ID you can only receive whole Infantry information and statistics.
At the bottom of this page is "test the script" section. Feel free to test how the script will return the data.
|
|
|
Zone specific population information |
Zone realtime population
https://infantry.gamespec.org/population/stats.php?get=population&id=[id]
Display realtime information about the zone
https://infantry.gamespec.org/population/stats.php?get=info&id=[id]
1
2
|
Zone name
Current population
|
1
2
|
[I:KOTH] Chamberts Moon
89
|
|
|
|
Infantry population information |
Total players currently online
https://infantry.gamespec.org/population/stats.php?get=population
1
|
Total players currently online in whole Infantry
|
Total zones currently online
https://infantry.gamespec.org/population/stats.php?get=zones
1
|
Total zones currently online
|
Average players per zone
https://infantry.gamespec.org/population/stats.php?get=average
1
|
Average players per zone
|
Highest populated zones
https://infantry.gamespec.org/population/stats.php?get=highest&top=[1-5]
1
2
3
4
5
|
Zone name (ranked 1st)
Zone name (ranked 2nd)
Zone name (ranked 3rd)
Zone name (ranked 4th)
Zone name (ranked 5th)
|
1
2
3
4
5
|
[I:CTF] Twin Peaks
[I:KOTH] Chamberts Moon
[I:SK] Mechanized Skirmish
[I:DB] Dodgeball
[I:HQ] Combined Arms
|
Highest populated zones population
https://infantry.gamespec.org/population/stats.php?get=highest_population&top=[1-5]
1
2
3
4
5
|
Zone population (ranked 1st)
Zone population (ranked 2nd)
Zone population (ranked 3rd)
Zone population (ranked 4th)
Zone population (ranked 5th)
|
1
2
3
4
5
|
614
229
146
66
32
|
Information about whole Infantry
https://infantry.gamespec.org/population/stats.php?get=info
1
2
3
4
5
|
Current population of whole Infantry
Total zones avaible currently
Average players per zone
Highest populated zone currenlty
Current population of highest populated zone
|
1
2
3
4
5
|
1205
52
23.17
[I:CTF] Twin Peaks
614
|
|
|
|
Test the script |
Now you are able to get zone specific population information to your own website.
1
2
3
4
5 |
1
9
0.11
SK - Minimaps
1
|
|