[php] Help with GD...

ex visor
Loyal Member
Joined
May 17, 2007
Messages
2,738
Reaction score
939
I'm trying to figure out how to put another image in here, I've looked in google but I can't find any good tutorials on GD it's becoming really annoying.

Does anyone know how this is done?
This is what I have thus far:

PHP:
<?php 
/* background for the signature  */
 $background = "background.png"; 
 /* url of a font to use in the text */ 
 $font = "arial.ttf"; 
/******************************************************************************/ 
 // i create the image to show 
 header("Content-type: image/png"); 
 // show the background 
 $image = imagecreatefrompng($background); 
 // make black color 
 //$negro = imagecolorallocate($imagen,0,0,0); 
 // text to show 
 mysql_connect('127.0.0.1','xxx','xxx');
 mysql_select_db('gunbound');
 
 $nick = mysql_real_escape_string($_GET['u']);
 $sql = mysql_query("SELECT * FROM `game` WHERE `NickName`='$nick'");
 $sqlly = mysql_fetch_assoc($sql);
 
 $nickname = $sqlly['NickName'];
 $totalgrade = $sqlly['TotalGrade'];
 
 
 $white = imagecolorallocate($image, 255, 255, 255);

 

 imagettftext($image, 8, 0, 160, 21, $white, $font, $nickname);  
 //imagettftext($imagen,7,0,160,20,$negro,$fuente, $texto); 
 // i print the image with the text 
 imagepng($image); 
 ?>

P.S: The image is supposed to be $totalgrade >.>;

Thanks, Aaron.
 
Back