Jump to content

[SOLVED] PHP GD


Demonic

Recommended Posts

nvm I got it I used image copy:

 

$bgs = glob("captcha/*.gif");
$total = sizeof($bgs);
$bg = rand(0,$total);
$bg = $bgs[$bg];
//echo "<img src='{$bg}' />";
header("Content-Type: image/gif");
$w = 100;
$h = 30;
$img = imagecreatetruecolor($w,$h);
$temp = imagecreatefromgif($bg);
imagecopy($img, $temp,0,0,0,0,$w,$h);
imagegif($img);

Link to comment
https://forums.phpfreaks.com/topic/103611-solved-php-gd/#findComment-530552
Share on other sites

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.