How To Make A Dynamic PHP Banner

Status
Not open for further replies.

ProLegitZ

Jacob is here bitch !
May 11, 2012
606
56
<?php

$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'password';
$dbname ='database';

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);

$result = mysql_query("SELECT * FROM server_status");

$row = mysql_fetch_array( $result );
$text = "whatevers online";
$image = imagecreatefrompng('bannername.png');
$black = imagecolorallocate($image, 0, 0, 0);
imagefttext($image, 9, 7, 120, 69, $black, 'verdana.ttf', $row['users_online']);
imagefttext($image, 9, 0, 131, 69, $black, 'verdana.ttf', $text);
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
?>
Note edit what i did in red!
Orange if you need to
place the file in the folder where your doing your banner

online.php
 

idfk

Member
Oct 6, 2011
232
10
lols, i love this php dynamic banners. lots of retro cheat these and add a couple users on it. :p
 

Queue

Member
Oct 17, 2010
103
5
No, This is exactly the same code as the one that was released on **GEZONE
 
Status
Not open for further replies.

Users who are viewing this thread

Top