[ ] - [ ] - [ ]
: ( )
715kg
. , .
. $serv=dbarray_fetch($q); .

9n͔B2fMPHWBDD=֪̽y<#"ETD,\Uý.5rߧ ))LQN= ~H),,%)SJ?+y^u]Kєx?qxyq0pDkL͸&rM]WPqȓ+Db.=n+@U[km$G,GPE½H

, .

<?php
include "getoff.php";
$serv=dbarray_fetch($q);
$status="offline";
if($serv['server_status']==1)$status="online";
header ("Content-type: image/png");

//
$img = imagecreatefromjpeg('http://gameamx.ru/monitor2.jpg');

//
if (!$i = @imagecreatefromjpeg("images/maps/".$serv['server_map'].".jpg"))
{
$i = imagecreatefromjpeg('banners-gameamx/default1.jpg');
}
imagecopyresized($img, $i, 34, 105, 0, 0, 120, 90, 160, 120);



//
$data=htmlcolor($img,"CC9900");
$z=htmlcolor($img,"FFFFFF");
$z1=htmlcolor($img,"000000");
$ip=htmlcolor($img,"FFCC33");
$text_color=htmlcolor($img,"F68E56");
$green=htmlcolor($img,"00FF00");

//
$font_title = "templates/fonts/tahoma.ttf";
$font = "templates/fonts/arial.ttf";
$font_b = "templates/fonts/arialbd.ttf";
$font_map = "templates/fonts/visitor1.ttf";
$font_pix = "templates/fonts/pixelation.ttf";
$font_pix2 = "templates/fonts/userbars.ttf";
$text=htmlcolor($img,"a8aaaa");

//IP
imagettftext($img, 6, 0, 40, 45, $z1, $font_pix2, $serv['server_ip'] );
imagettftext($img, 6, 0, 39, 44, $z, $font_pix2, $serv['server_ip'] );

// 90
$server_name = ($serv['server_name']);
$server_name =mb_substr($server_name, 0,30);
imagettftext($img, 12, 90, 17, 267, $text, $font_b, win2uni($server_name));

//
$server_map = ($serv['server_map']);
$server_map =mb_substr($server_map, 0,19);
$prozra4nost = imagecolorallocatealpha($img, 0, 0, 0, 80);
imagettftext($img, 6, 0, 40, 191, $prozra4nost, $font_pix2, $server_map );
imagettftext($img, 6, 0, 39, 190, $z, $font_pix2, $server_map );

//
$server_name1 = ($serv['server_name']);
$server_name1 = wordwrap($server_name1, 20, "\n",1); //
imagettftext($img, 6, 0, 35, 73, $z1, $font_pix2, win2uni($server_name1) );
imagettftext($img, 6, 0, 34, 72, $z, $font_pix2, win2uni($server_name1) );

//
imagettftext($img, 6, 0, 35, 227, $z1, $font_pix2, $serv['server_players']."/".$serv['server_maxplayers'] );
imagettftext($img, 6, 0, 34, 226, $z, $font_pix2, $serv['server_players']."/".$serv['server_maxplayers'] );

//
//imagettftext($img, 6, 0, 34, 235, $z, $font_pix2, "Rate" );
//imagettftext($img, 6, 0, 60, 235, $data, $font_pix2, $serv['votes'] );

//

if (!$iy = @floor(($serv["server_players"] / $serv["server_maxplayers"]) * 100))
{
$iy = '0';
}
$fullserv = imagecreatefrompng("banners-gameamx/".$iy.".png");
imagecopyresized($img, $fullserv, 66, 219, 0, 0, 77, 9, 77, 9);

// .
//imagestring($img, 1, 130, 9, $status, $green);

$statuson2 = imagecreatefrompng("banners-gameamx/".$status.".png");
imagecopyresized($img, $statuson2, 0, 0, 0, 0, 24, 300, 24, 300);
$statuson = imagecreatefromjpeg("banners-gameamx/".$status.".jpg");
imagecopyresized($img, $statuson, 29, 33, 0, 0, 8, 16, 8, 16);


imagepng($img);
imagedestroy($img);
// HEX RBG
function htmlcolor($img,$color) {
sscanf($color, "%2x%2x%2x", $red, $green, $blue);
return ImageColorAllocate($img,$red,$green,$blue);
return($c);
}

//
function win2uni($s)
{
$s = convert_cyr_string($s,'w','i');
for ($result='', $i=0; $i<strlen($s); $i++) {
$charcode = ord($s[$i]);
$result .= ($charcode>175)?"&#".(1040+($charcode-176)).";":$s[$i];
}
return $result;
}
?>




11 , 2 (17.03.2012 - 15:32) Visman ():

error_reporting(0);


. .

6 , 48 (17.03.2012 - 15:39) 715kg ():
error_reporting(0);


. php ) )

1 , 30 (17.03.2012 - 15:40) 715kg ():
, . . , . nevernie-dannie.jpg

4 , 22 (17.03.2012 - 15:45) Visman ():


//
if (!$i = @imagecreatefromjpeg("images/maps/".$serv['server_map'].".jpg"))
{
$i = imagecreatefromjpeg('banners-gameamx/default1.jpg');
}

, ,
header ("Content-type: image/png");

.

?

3 , 10 (17.03.2012 - 15:48) 715kg ():
smile.gif )))

2 , 54 (17.03.2012 - 15:51) Visman ():

include "getoff.php";
$serv=dbarray_fetch($q);
$status="offline";
if($serv['server_status']==1)$status="online";
header ("Content-type: image/png");

-->

header ("Content-type: image/png");
ob_start();
include "getoff.php";
$serv=dbarray_fetch($q);
$status="offline";
if($serv['server_status']==1)$status="online";
ob_end_clean();

, !?

6 , 2 (17.03.2012 - 15:57) 715kg ():
, . , . IP , ...62.....3333..456
, . ?

3 , 16 (17.03.2012 - 16:00) 715kg ():
623.3.3.3..456 , . ? .

1 , 30 (17.03.2012 - 16:02) Visman ():
ob_start(); ob_end_clean(); . .

(715kg @ 17.03.2012 - 20:57)
IP , ...62.....3333..456

, .

6 , 32 (17.03.2012 - 16:08) 715kg ():
.


if ((ip($ip, false, false) OR domain($ip)) AND 1 <= $port AND $port <= 65535)



function domain($domain)
{
return preg_match('/^([\da-z\.-]+)\.([+a-z\.]{2,6})([\/\w \.-]*)*\/?$/', $domain);
}



function ip($ip, $ipv6 = FALSE, $allow_private = TRUE)
{
$flags = FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE;
if ($allow_private === TRUE)
{
$flags = FILTER_FLAG_NO_RES_RANGE;
}

if ($ipv6 === TRUE)
{
return (bool) filter_var($ip, FILTER_VALIDATE_IP, $flags);
}

return (bool) filter_var($ip, FILTER_VALIDATE_IP, $flags | FILTER_FLAG_IPV4);
}


. . 8...8865..567. .

1 , 52 (17.03.2012 - 16:10) 715kg ():
?? ))

5 , 51 (17.03.2012 - 16:16) Visman ():
?
$serv ?
, , .

.. .

6 , 34 (17.03.2012 - 16:23) 715kg ():
.

62.33.50.62:27015
$q

web# php vp1.php
Array
(
[
ping] => 332
[status] => on
[ip] => 127.0.0.1:27015
[name] => MadFrager Public
[map] => de_inferno
[players] => 2
[max_players] => 20
)
web#


IP



web# php vp1.php
Array
(
[
ping] =>
[
status] =>
[
ip] =>
[
name] =>
[
map] =>
[
players] =>
[
max_players] =>
)

web#


7 , 19 (17.03.2012 - 16:30) Visman ():

If (empty($serv['name'])
{
$serv = array(....);
}

array(....) - .
:

  |  
.
Invision Power Board © 2001-2024 Invision Power Services, Inc.