hi,
i am using GD Library and want to create multiple images
But this code creat only 1 image ?
My code is
[code=php]for($i=0;$i<3;$i++){
$values = array(
‘event_name’ => “Disney On Ice presents DARE TO DREAM”,
‘ticket_number’ => “0000008830”,
‘event_date’ => date(‘Y-m-d’),
‘time’ => date(‘H:i’),
‘recipi’ => “John Smith”,
‘state’ => “Amway Center”,
‘address’ => “400 W Church Street”,
‘city’ => “Orlando FL”,
‘zip’ => “32805”,
‘expire_date’ => “Friday, Sep. 30, 2011”,
‘event_image’ => “ss”,
‘ticket_type’ => “This is the ticket type”,
‘ticket_price’ => “$25.00”
);
$event_name = $values[‘event_name’];
$width = 800;
$height = 436;
$arialbd = “arialbd.ttf”;
$arial = “arial.ttf”;
$im = imagecreatefrompng(“blankticket.png”);
$black = imagecolorallocate($im, 0, 0, 0);
$yellow = imagecolorallocate($im, 238, 175, 12);
$blue = imagecolorallocate($im, 1, 100, 165);
imagettftext($im, 10, 0, 583, 68, $black, $arialbd, $ticket_number);
header (“Content-type: image/png”);
imagepng($im, ‘ticket.png’);
imagepng($im);
header(‘Content-Type: image/png’);
header(‘Content-Disposition: attachment;filename=”ticket.png”‘);
$fp=fopen(‘temp_ticket.png’,’r’);
fpassthru($fp);
fclose($fp);
}