Sessions across servers?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm try to implement a CATCHPA script on a server that doesn't have GD
extension. So i'm calling a PHP script on another server to return the
image.  Only problem is I need to return a variable along with the
image as below

On server 1(Without GD)
<img src="
width=100&height=40&characters=5" />

ON server 2(Image creation and security code scipt)
header('Content-Type: image/jpeg');
$_SESSION['security_code'] = $code;

Script works fine if all files on server with GD extension, my only
problem is getting back the "$_SESSION['security_code'] = $code;"


Re: Sessions across servers?

CK schreef:
Quoted text here. Click to load it


No, you cannot easily share session between different servers.
Unless you want to get into the detail of it, my advise would be to
simply use recaptcha: /

Using that also:
1) Makes sure your captchas are difficult enough, but readable
2) Makes your captcha even work for visual disabled/impaired visitors
3) You help translate books!
4) Very easy to set up and use.
5) public/private key logic implemented, so hackers/spammers will have a
hard time.

Erwin Moller

Re: Sessions across servers?

Nice, that will work well for me.  Thanks.
On 15 Jul, 17:38, Erwin Moller
Quoted text here. Click to load it

Re: Sessions across servers?

Quoted text here. Click to load it

if there's a db on the other server, why not just pass a reference key to it
on the query string ass well? the remote server makes an entry in its db,
recording the reference number and the security code it has encoded in the
image. on your side, you'd simply query the remote db by reference key to
get the security code used.

there are other ways of doing it, but this is the least tricky...that i can
tell, all things considered.

Re: Sessions across servers?

Quoted text here. Click to load it

Thanks for the reply.  Will keep this in mind.

Site Timeline