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?

51 Like 47 Dislike
Previous php-forum Next php-forum
Other php-forum

ob_ dynamic content
i was wondering about the potential to use ob to create a <div then remove it when the page

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

MS are the best!!!
Visit http://www.microsoft.com/australia/windows/default.aspx?h=watch-a-demo and click the massive '

Connect to database that isn't localhost
I am currently doing a small script for a company that doesn't have mySql support on there hosting.

Print 'a' to 'z' via for loop
A very simple problem..
How Can I print a to z NOT a to y ?
It is a part of a code where
<

Phase Error I can't seem to find :(`
Hey guys, I can seem to find my phase error on this. I am getting this error

[error]
Pars

Interpret Order
Hello all,

I'm wondering if I have this:

Code: $switch = array(
'one' =>

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

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