-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
97 lines (87 loc) · 3.5 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
if (!empty($_GET['q'])) {
switch ($_GET['q']) {
case 'info':
phpinfo();
exit;
break;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Status FlashKaza RP</title>
<link href="https://fonts.googleapis.com/css?family=Karla:400" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
background-color: #5611b2;
}
body {
margin: 0;
padding: 0;
width: 100%;
display: table;
font-weight: 100;
font-family: 'Karla';
}
.container {
text-align: center;
display: ;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
}
.title {
font-size: 96px;
color: white;
}
.opt {
margin-top: 30px;
}
.opt a {
text-decoration: none;
font-size: 150%;
}
a:hover {
color: red;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="info"><br />
<?php
/*-----------------------[ CONFIG ]------------------------------*/
$server_settings['title'] = "[YOUR_TITLE_WEBSITE";
$server_settings['ip'] = "[YOUR IP SERVER]";
$server_settings['port'] = "[YOUR LISTENING PORT]";
$server_settings['max_slots'] = "[NUMBER SLOT];
/*----------------------------------------------------------------*/
print "<div style='background-color: #9b79cc; border: 4px double #7f3dd9; border-radius: 5px; width: 300px; padding: 2px;'>";
$content = json_decode(file_get_contents("http://".$server_settings['ip'].":".$server_settings['port']."/info.json"), true);
$img_d64 = $content['icon'];
if($content):
$gta5_players = file_get_contents("http://".$server_settings['ip'].":".$server_settings['port']."/players.json");
$content = json_decode($gta5_players, true);
$pl_count = count($content);
$SRV_STATUS = "<font style='color:lime;font-weight:bold'>Online</font>";
if($img_d64) { print "<div align='center'><img width='150' src='data:image/png;base64, $img_d64' ></div>"; }
print "<p align='center' style='color:#000000;'><strong>$server_settings[title]</strong></p>";
print "<p align='center'><strong>Players:</strong> $pl_count / $server_settings[max_slots]</p>";
else:
print "<p align='center' style='color:#000000;'><strong>$server_settings[title]</strong></p>";
$SRV_STATUS = "<font style='color: red;'>Offline</font>";
endif;
print "<br/><hr/><p align='center'><strong>Status: $SRV_STATUS</strong></p></div>";
?>
<br/><hr/><p align='center'><strong>Discord: </strong> <a href="https://discord.flashkaza.com/">HERE</a> </p></div>
</div>
</div>
</div>
</body>
</html>