l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2005 Dec 17 00:15

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] when is an html image "sent"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

On Fri 16 Dec 05,  8:53 AM, Ted Deppner <ted@psyber.com> said:
> On Fri, Dec 16, 2005 at 10:28:40AM -0500, Peter Jay Salzman wrote:
> > is there some kind of technique I can use to make sure the image file gets
> > deleted after it's shipped off to the client?
> What Rod said is typically the best (generate it inline), except you'll
> have somewhat higher CPU needs as each time a customer goes back or
> reloads the page you'll generate another image.  Also, you have to think
> about how you'll know what the key is you stuck in the image... the page
> taking the FORM must correlate with the image you generated.
You ain't kidding!

I've been at this for a few hours now.  It seemed "obvious" to use sessions
to store the verification string:

   // file: captcha2.png

   // Create the string.  I've removed "0", "O".

   // Create image and define colors

   imagestring ($image, 5, 1, 1, $cmntPass, $colorBlue);
   ImagePNG( $image );
   ImageDestroy( $image );

   $_SESSION['captcha'] = $cmntPass;

and display the image as:

   <img src="captcha2.php">

Where $cmntPass is the verification string.  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.

I'm now equal parts curious and frustrated.  When using this method to show
the verification image, how DOES one pass the verification string to the
page that takes the form?

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.