It will depend on if your web host has the right Library enabled.
On a tech note though, php4 is like windows 98, its had its day, currently php5 is a stable release and the buzz word is PHP6 is under development.
Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08) Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08) I want to leave this world the same way I came into it, Screaming, Incontinent & No memory! I laughed that hard I burst my colostomy bag... (\\.\ May03) Life for some is like a car accident... Mine is like a motorway pile up... Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?
i dont want a program, I dont want a 3rd p[arty site, there has to be a way to intergrate it into my site, I have it enabled but it doesnt seem to work the way I want it too
What have you enabled? There's no way for us to know why it does not work if we don't know what PHP code you are using to try to make it work.
PS: What is your alternative for visually impaired users? At least using a third-party solution like www.recaptcha.net your users would have an audio option. Personally, I've decided to eschew annoying captchas entirely and gone with a couple anti-robot techniques to make life a bit more difficult for them: www.charles-reace.com/PHP_and_MySQL/Contact_Form .
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
visually impaired? I mean how can you be visually impaired and go online? I mean there is no option, I think I might have ti do something like 123456 in a form, or type yes if they are a human something klike that
I wish that Captchas weren't necessary! The JustHumans tool is an interesting alternative, too. You click a picture instead of having to enter several letters.
Most common solution for the visually impaired is text to speech readers. And even someone like myself who has a damaged retina but can still read text pretty well may have trouble with that obscured captcha image on your site and just get frustrated and decide to go somewhere else.
PS: Depending on where in the world you are and what sort of service you are providing, you might even be susceptible to legal action if your site is not handicapped accessible.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
are you serious? I mean I have been running babyjai.com without a captcha for a long time, but I never knew that about being sued, they can sue the company not me, but I didnt know that. How would i just make a form where they have to put in like a set amount of number or a word?
[foreshadowing]I actually address some of your technical question at the end of this post.[/foreshadowing]
I'm not saying you would be sued, or that your site necessarily comes under any such jurisdiction, as I'm certainly not a lawyer and have no desire to be. I just wanted to bring to your attention that a graphic-only captcha can be an accessibility issue. Whether or not you have a legal, moral, or commercial reason to worry about that is really your concern.
In the US, if your site is for any Federal agency, then it must comply to Section 508 for accessibility. I do not know if there are any other federal regulations at this time that apply to non-federal websites, and of course different states may have their own regulations.
It is my understanding that in the UK the Disability Discrimination Act is more wide-ranging in its applicability than Section 508 is here. But again, I am not lawyer, so consider all this to be "food for thought" at this point.
If you are interested in site accessibility, there is a forum right here at webdeveloper.com with a number of information "sticky" posts that might be worth a look.
Anyway...if you want to employ some sort of captcha, whether it be graphic or text or audio or whatever, the general process would be to generate the string, save it in a session variable, then provide the necessary prompt to the user for what needs to be entered. Then when you validate the form input, you check the value entered against that stored in the session variable. (Remember that both the form page and the form processor page will need to have a session_start() before any output is generated and before any data is read from or written to the $_SESSION array.)
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
thanks for that info, I dont really know to much about php, but I can post the php mailer here, its a general mailer, but I need to know how to add the string so it can be entered, this way its regular text and dont have to worry about a captcha image only thing
TO Create a simple Captcha form, then here is a small guide:
===== 1 STEP ======
in your FTP folder (where you need), put a font file (for example, this: http://www.webpagepublicity.com/free...Anklepants.ttf )
then create a file (called captcha.php) and paste the below code inside it (then put that captcha.php in the same ftp folder):
Code:
<?php
session_start();
// generate random number and store in session
$randomnr = rand(1000, 9999);
$_SESSION['randomnr2'] = md5($randomnr);
//generate image
$im = imagecreatetruecolor(100, 38);
//colors:
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 200, 35, $black);
// ------------- your fontname -------------
$font = 'Anklepants.ttf';
//draw text:
imagettftext($im, 35, 0, 22, 24, $grey, $font, $randomnr);
imagettftext($im, 35, 0, 15, 26, $white, $font, $randomnr);
// prevent client side caching
header("Expires: Wed, 1 Jan 1997 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revаlidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
//send image to browser
header ("Content-type: image/gif");
imagegif($im);
imagedestroy($im);
?>
===== 2 STEP ======
then in any page (where you want to implement the captcha) put this code somewhere inside that page (but of course, in the last part of this code, there is a sample php fucntion to make an sample action if code is entered correctly. So you should know a more php programming to execute your desired fucntions when Captcha is correct):
Code:
<form method="post" action=""> <img src="captcha.php" />
<input class="input" type="text" name="codee" />
<input type="submit" value="Submit" />
</form>
<?php
session_start();
if (md5($_POST['codee']) == $_SESSION['randomnr2']) {
// here you place code to be executed if the captcha test passes
echo "YES. Do Something function1";
}
else {
// here you place code to be executed if the captcha test fails
echo "No. Do Something function2";
}
?>
Bookmarks