need help in creating captcha


Posted on 16th Feb 2014 07:03 pm by admin

hi i have a problem creating captcha system. i create some basic script for image displaying but it says this error
Code: The image “http://localhost/examples/captcha.php” cannot be displayed, because it contains errors.
my code is here

Code: <?php
$img = imagecreatetruecolor(80,30);

$white = imagecolorallocate($img, 255, 255, 255);
$black = imagecolorallocate($img, 0, 0, 0);
$red = imagecolorallocate($img, 255, 0, 0);
$pink = imagecolorallocate($img, 200, 0, 150);

imagefill($img, 0, 0, $black);

imagettftext($img, 12, 0, 15, 15, "calibri.ttf", "hello");

header("Content-type: image/png");
imagepng($img);
imagedestroy($img);
?>
where is the error and how it can be fixed?

No comments posted yet

Your Answer:

Login to answer
51 Like 47 Dislike
Previous forums Next forums
Other forums

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

Registration
ok so i have a site where people can register and login which works now thanks to someone on here th

Form submissing with PHP and JQuery/Ajax
I have searched everywhere, but cannot find a solution for this... I have worked all day trying to g

dropdown menu
Hello everbody,

I am php newbie.
I need to develop a program that once click the drop do

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

Word Trimming
Hi Guys & Gals!!

Hope you are all ok....

I need some help with the following

Image DPI
Hi.

I allow users to upload images, the user then is able to adjust several settings for the

Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"

Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its val

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash