[vox-tech] when is an html image "sent"?

Rod Roark rod at sunsetsystems.com
Sat Dec 17 00:15:29 PST 2005


On Friday 16 December 2005 11:24 pm, Peter Jay Salzman wrote:
> ... No matter what I try, though, I
> can't access sessions from the captcha2.php file.  I guess it must interfere
> with the image being sent to the client.

Oooh.  It must be that there's no mechanism for the browser to send
the cookie (which contains the session ID) when it requests an
image.  Sorry I caused you so much trouble.

I think what may work is to send the session ID in the URL.  That is,
construct the image URL like this:

  $url = 'captcha2.php?' . session_name() . '=' . session_id();

and then your form requests the image with:

  <img src='<?php echo $url ?>'>

or whatever the equivalent is with Smarty.

I have not tried this, it's just my best guess from reading the docs.

-- Rod


More information about the vox-tech mailing list