Jump to content

[SOLVED] I need some PHP help


weretemplar

Recommended Posts

have a look at the GD library you can copy the top image on to a blank image then add the text at the bottom.

something like

$output = imagecreatetruecolor(200, 300); //create blank image to put main pic and text on
//colours
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
//main pic
$main_pic = imagecreatefromjpeg("main_pic.jpg"); //open main pic
imagecopy($output, $main_pic, 0, 0, 0, 0, 200, 200);
imagettftext($output, 12, 0, 0, 200, $black, "fontfile.ttf", "Level {$level}");
header('Content-type: image/png');
imagepng($output);

You would need a mysql db to keep track of all the users and there level

 

Scott.

It's not something you can copy and it'll magically work. ratcateme gave the basic guidelines on how to create something like what you've asked.

You have to actually understand what's written there and learn how to edit this basic example so it'd fit your own needs.

 

Orio.

Archived

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

×
×
  • 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.