-
Notifications
You must be signed in to change notification settings - Fork 10
/
banner1.php
30 lines (28 loc) · 877 Bytes
/
banner1.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
<?php
header("Content-type: image/png");
include 'query.php';
$font = 'minecraft.ttf';
$online = 'Online:'.$currentplayers.'/'.$maxplayers.'';
if($ostatus == 2) {
$hostname = $_GET['name'];
}
$oaddress = 'IP:'.$host.'';
$oport = 'Port:'.$port.'';
$im = imagecreatefrompng("banner1.png");
$white = imagecolorallocate($im, 255, 255, 255);
$green = imagecolorallocate($im, 127, 255, 0);
$red = imagecolorallocate($im, 255, 0, 0);
$px = 10;
imagefttext($im, 23, 0, 10, 30, $white, $font, $hostname);
imagefttext($im, 13, 0, 10, 50, $white, $font, $oaddress);
imagefttext($im, 13, 0, 10, 70, $white, $font, $oport);
if($ostatus == 1) {
imagefttext($im, 13, 0, 10, 90, $green, $font, $online);
}
else {
imagefttext($im, 13, 0, 10, 90, $red, $font, 'Offline');
}
imagefttext($im, 10, 0, 395, 90, $white, $font, 'banner.99leonchang.com');
imagepng($im);
imagedestroy($im);
?>