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

Did you know?Explore Trending and Topic pages for more stories like this.
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

Displaying data from database into a 2 dimensional table
Good day!

I'm a beginner in PHP and I'm not expecting a full coding for this qestion. I'm jus

How to get variable value on next page
Hello friends
i am working on payentry page ..there i have this code.........

Form a inline view based on the results of the previous query?
Hi Experts,
Can we form a inline view on the results of a previous query (another inline view)?

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a swit

Option box to change variable
Hello, i need help by making a script!

I need to write a file with option box, so a dropdown

frames get header location..
i have two frames, one top, one bottom. how do i do a form on the bottom frame that gives me the ur

Where is my php.ini???
Hi

First off - apologies - i'm not a coder so this may sound very amateur.

I'm having

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