Forum Moderators: coopster

Message Too Old, No Replies

PHP Drivers License?

I need to create something like a drivers license in PHP

         

bluesguitarman25

2:02 pm on Jun 18, 2007 (gmt 0)

10+ Year Member



Hopefully someone can direct me to a script out there.... i would not have a clue how to write this, still new.

Ok, I need a script that will allow users to upload a specific size image that will be placed on top of a pre-existing image, along with text from a form, all to create an id of sorts. it should be saved as a jpeg when finished. not sure how to go about this, so absolutely any help would be appreciated.

Aloha

bysonary

2:10 pm on Jun 18, 2007 (gmt 0)

10+ Year Member



look into the following php functions they might help you:

[uk3.php.net...]
[uk3.php.net...]
[uk3.php.net...]
[uk3.php.net...]

you may need a few more but they will get you on the right track, if you want to view the page where the above functions and other image functions can be found goto the below url.

[uk3.php.net...]

oh and it is worth mentioning you will need the gd image library installed/enabled in your php.ini file in order to use the gd functions.

HTH

ChrisW

joelgreen

5:47 pm on Jun 18, 2007 (gmt 0)

10+ Year Member



Also try searching for watermark script in php. Some watermark scripts are somewhat similar to what you need - they merge original image with a watermark image. You'll get the idea.

bluesguitarman25

4:18 pm on Jun 24, 2007 (gmt 0)

10+ Year Member



ok folks, so far I have got this, but when i run the script, the text string is way too tiny and i'm not sure how to align it differently. any help?

<?php
header("Content-type: image/png");
$string = $_POST['text'];
$im = imagecreatefrompng("CITIZEN_ID_CARD.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
print '<img src="text_merge.php?text=text">';
?>