/    Sign up×
Community /Pin to ProfileBookmark

captcha font

First of all i hope someone can help me i do not know about php so if you can help me i apreciate it a lot if someone can give me the correct code to be added for the blow things

the below code is a captcha code i want to be able to set my own font how can i do this? and is it possible to turn this into a png image with transparancy background?

[code=php]<?php
session_start();
//$text = rand(1000000,9999999);
$text = rand(10000,99999);
$_SESSION[“vercode”] = $text;

$height = 17;
$width = 60;

$image_p = imagecreate($width, $height);
$black = imagecolorallocate($image_p,243,247,250);
$white = imagecolorallocate($image_p, 0, 0, 0);
$font_size = 8;

imagestring($image_p, $font_size, 5, 0, $text, $white);
imagejpeg($image_p, null,100);

?>

[/code]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@rtretheweySep 07.2013 — See [url=http://www.php.net/manual/en/function.imagefttext.php]http://www.php.net/manual/en/function.imagefttext.php[/url]
×

Success!

Help @poep spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...