I have been trying to implement a captcha in php...
here is the code..
Code: (php) [Select]<?php
// Set the content-type
header('Content-type: image/png');
// Create the image
$im = imagecreatetruecolor(400, 30);
// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
// The text to draw
$text = 'Testing...';
// Replace path by your own font path
$font = 'arial.ttf';
// Add some shadow to the text
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
// Add the text
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
?>
But in the browser, it gives the following error...
QuoteThe image “http://127.0.0.1:9000/img1.php†cannot be displayed, because it contains errors.
Somebody tell me the reason and how to fix this ..
Production of mango in processing industry
Hi,
Problem Dereferencing
With these types and tables:
How to update this array?
I am saving a string that looks this: username1, username2, username3...into a single cell in a database table. I am doing this so that when I retrieve that string using normal methods, I can turn it
Customizing message/behavior
Hi,I'm using the ASP.NET membership/authorization controls in my application. Some parts of my application are reserved for users who are in certain roles i.e. editor, writer, etc. I control this with
ALV List Display to point to another report on Double Click
Hi,
Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and works fine EXCEPT I want to add the strip slashes bit to it so it will save what I type in. However,
SAP FICO learning materials
Hi all,
PHP referral database. I would like this form to email the referrer.
Okay, Hello I've been trolling for years. This the first time I've ever asked for php help. Normally my questions seem so amateur when I finally find theanswer on my own. But this is making me pull my
! = ''
In the following 'IF' statement if v_ompcat = PU for example then Oracle equates that 'IF' statement to NOT TRUE and skips onto the next 'IF' satement whereas I would have thought that it would have
need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requirements:Page A - which resides in a private directory so only he as access to it (this part is set up,