Jump to content

TCadmin count


DanCF

Recommended Posts

  • 3 weeks later...

Yeah this is perfectly possible and actually quite easy.

 

 

 

You can query your database for the amoutn of servers, or slots, then you will have the number you need, then you can just print it on any image.

 

 

 

Sorry I dont have time to do the code but thats the basic idea.

Link to comment
Share on other sites

  • 3 months later...


<?php

$backimg = "tsig.png";

function db_connect($db_host, $db_user, $db_pass, $db_database) {
mysql_connect($db_host,$db_user,$db_pass) or die(mysql_error());
mysql_select_db($db_database) or die(mysql_error());
}


db_connect("server ip", "username", "pass", "database");

	$result = @mysql_query("select * from tc_services "); 		
	$s = 0;
	while ( $row = mysql_fetch_array($result) ) { 
		$s++;
	}

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


$im    = imagecreatefrompng($backimg);
$green = imagecolorallocate($im, 0, 255, 42);
$white = imagecolorallocate($im, 255, 255, 255);

imagestring($im, 3, 10, 02, 'Gaming-Biz :: www.gaming-biz.net', $green);

imagestring($im, 3, 10, 13, "Currently Hosting $s Servers", $white);


$oheight = imagesy($map);

imagecopyresized($map, $map, 0, 0, 0, 0, 65, 65, 150, $oheight);



imagepng($im);
imagedestroy($im);
?>

 

that should work fine but yeah let me know if i scrwed anything up

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Who's Online   0 Members, 0 Anonymous, 7 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use