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

issues verifying if user is logged in
I am having issues when a user logs in via asp Login control, the IsAuthenticated still seems to com

Generate multilayered array from string.
ok so i have a string that looks like this:
Code: [Select]blog:edit_all,delete_all|users:edit_all

SAP Treasury - Commodities
We are running SAP ECC 6.0 with Treasury Activated.
EA-FIN is also activated (SFW5).

Php navigation
I have four buttons on a php page.
If i click a button it will redirect to different php pages.

Simple image grab script.
I was wondering if it was possible and if anyone knew how to make a simple php script that looks at

Onclick problem in Firefox
Hi,
I am using a . It doesn't seem to

ALV sum various columns problem
Hi all,
I'm doing a report on ABAP for a timesheet of the current month. The output i want is s

Am I setting up my sites oldschool?
Ok,

When I create a site I open a basic template that I have created that consists of a css f

Implementing Single Sign-On using SAML 1.1, x.509, LDAP in C#.net
Hi, I got a requirement from the client i.e implementing single sing on using SAML 1.1( LDAP &

Problem in OnClientClick and OnClick sync
Hi,Strange and irritating problem: I have below button declaration in markup of the aspx page:

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