Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("Content-Type: image/gif");
- $string= $_REQUEST['ip'];
- $split = explode('_',$string);
- $ip = $split[0];
- $port = $split[1];
- require("SampQueryAPI.php");
- $query = new SampQueryAPI($ip, $port);
- if($query->isOnline())
- {
- $aInformation = $query->getInfo();
- $aServerRules = $query->getRules();
- $hostname = $aInformation['hostname'];
- $players = $aInformation['players'].' / '.$aInformation['maxplayers'];
- $website = $aServerRules['weburl'];
- }
- else{
- $hostname='Server ist Offline';
- $players='Server ist Offline';
- $website='Server ist Offline';}
- $im = imagecreatefrompng('sig/bg.png');
- $white = imagecolorallocate($im, 255, 255, 255);
- $width = imagesx($im);
- $height = imagesy($im);
- $font = 5;
- $font2 = 3;
- $leftTextPos = ( $width - imagefontwidth(5)*strlen($name)-30);
- $leftTextPos2 = ( $width - imagefontwidth(5)*strlen($gilde)-150);
- $leftTextPos3 = ( $width - imagefontwidth(5)*strlen($level)-150);
- $leftTextPos4 = ( $width - imagefontwidth(5)*strlen($rang)-150);
- $leftTextPos5 = ( $width - imagefontwidth(5)*strlen($reich)-150);
- imagestring($im, $font2, "320", $height-135, $ip.':'.$port, $white);
- imagestring($im, $font2, "320", $height-100, $players, $white);
- imagestring($im, $font2, "320", $height-65, $website, $white);
- imagestring($im, $font, "10", $height-27, $hostname, $white);
- imagepng($im);
- imagedestroy($im);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement