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

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

why isn't this PHP code working ???
it's suppose to find a name on the database.

<?php

$s = $_POST["lname&

server trace logs
could any one tell me from where do i get error logs in xMII??I want to check the reason for dtabase

Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year change

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

array_combine() error
getting an "Warning: array_combine() [function.array-combine]: Both parameters should have an e

listing help
Hi,

at first, great new design!!! I like it,

i got a problem,

I want to list so

Database 'Validation'
Hi everyone,
I'm trying to validate the password entered by the user with the password in the dat

Is it possible to stop reservation creation in PM Order?
Hi All,

Is it possible to stop reservation creation in PM Order?

Thanks in adv

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

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