Help - Search - Members - Calendar
Full Version: Ajax Captcha
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > JavaScript
Paul L
Hi all,

Has anyone here had experience with the ajax captcha over at http://psyrens.com/captcha/?

When I install it on my server, the image is coming back with the word "ERROR!" in it and I can't find how or where the image is created. I'd appreciate any pointers - thanks!

http://www.bandizmo.com/paul/ is the address.

Cheers,

Paul
Banjo
Tom made that captcha, maybe he will look at it.
Paul L
QUOTE(Banjo @ Dec 10 2008, 07:38 AM) *
Tom made that captcha, maybe he will look at it.


Thanks for the reply Banjo.

I contacted Rick (who's website I got the code off) and he sent me here.
"it's been quite a while since I've programmed and even longer since writing the AJAX CAPTCHA. As such I don't even know where to start when trying to help! Sorry!

However, someone at the Zymic forums is bound to be able to help, so try asking there. 8¬)"

I just can't work out how the numbers get onto the picture, there seems to be nothing in the code to do this, it just displays the image.

Any help would be appreciated.

Paul
Paul L
OK,

I'm getting there. I have found how the captcha image is made, the jpg file was php code to create a png, not a jpg itself.

So, I now have the problem - the session_start(); is not retaining the variable from the calling php code.

The index.php says:
<?php

// Make the page validate
ini_set('session.use_trans_sid', '0');

// Include the random string file
require 'rand.php';

// Begin the session
session_start();

// Set the session contents
$_SESSION['captcha_id'] = $str;


and the image.jpg says
<?php

// Begin the session
session_start();

// If the session is not present, set the variable to an error message
if(!isset($_SESSION['captcha_id']))
$str = 'ERROR!';


I'm really lost, it's not retaining the $_SESSION['captcha_id'] variable and I don't know why.

Can someone here help or throw any light on this?

Thanks in advance.

Paul
johnpitter
CAPTCHA is fooling the bots by asking questions only human can answer it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.