Code: Select all
<?php
session_start();
require ("connect.php");
require ("func.php");
$result = mysql_query("SELECT * FROM users WHERE id='$id'");
$getbalance = mysql_fetch_array($result);
$balance = $getbalance['balance'];
$v = array(
"Hello...",
);
$message = $v[rand(0, sizeof($v)-1)];
header ("Content-type: image/png");
$im = imagecreatefrompng("background.png");
$img_handle = ImageCreate (300, 100) or die ("Cannot Create image");
$back_color = ImageColorAllocate ($img_handle, 255, 255, 255);
imagecolortransparent ($img_handle, $back_color);
$color_1 = ImageColorAllocate ($img_handle, 255, 102, 51);
$color_2 = ImageColorAllocate ($img_handle, 1, 1, 1);
$color_3 = ImageColorAllocate ($img_handle, 51, 102, 255);
ImageLine($img_handle, 0, 1, 250, 1, $color_2);
ImageString ($im, 40, 0,2, "Username: ", $color_1);
ImageString ($im, 40, 80,2, $username, $color_1);
ImageString ($im, 40, 0,12, "Balance: ", $color_1);
ImageString ($im, 40, 80,12, $balance, $color_1);
ImageString ($img_handle, 2, 0,22, "Euro-time guild on Crushbone", $color_1);
ImageString ($img_handle, 31, 0,35, "Loading Please Wait...", $color_2);
ImageString ($img_handle, 0, 0, 50, $message, $color_3);
ImagePng ($im);
?>