html - Increasing font size in PHP code and align text in center of captcha image -
i have following php code generates , gives me captcha. captcha code lies on top left corner of 180x60 background image (fuzzy type captcha background image). , 12px in size. want bring exect center of image font size of 18px or more (adjustable). but, not sure how confusing edit code this.
here code.
<?php session_start(); $ranstr = md5(microtime()); $ranstr = substr($ranstr, 0, 6); $_session['cap_code'] = $ranstr; $newimage = imagecreatefromjpeg("images/cap_bg.jpg"); $txtcolor = imagecolorallocate($newimage, 0, 0, 0); imagestring($newimage, 5, 5, 5, $ranstr, $txtcolor); header("content-type: image/jpeg"); imagejpeg($newimage); ?>
any appreciated. thank you!
Comments
Post a Comment