Re: Random Image Store

From: Date: Wed, 11 Jun 2003 15:39:53 +0000
Subject: Re: Random Image Store
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-151093@lists.php.net to get a copy of this message
"Monil Chheda" <monil_ch@yahoo.com> wrote in message news:20030611052541.87794.qmail@web40810.mail.yahoo.com... > I want to create an php system that prevents automated > registrations. > > I have come up with the script in which users come > over and need to enter a random key displayed on the > images while submitting their info. If the number > entered is correct, the post is submitted, else, the > same form is displayed with another random key. > > Now, any one doing a "View Source" gets to know the > image source as "myscript.php". What I want to do is > to save the .jpeg image on my disc with the name as > "randomnumber.jpeg" , where randomnumber is generated > randomly for that page. > > Then, I would put an <IMG SRC="randomnumber.jpeg"> tag > and no one will be able to get the name of my php file > creating the image. Why should it matter whether they know the generating script's name? The only important thing is that they can't easily read off (or generate) the password-value passed to the image-creation script. You could store the passcode as a session variable, or send it as an encrypted get- variable, or hash into a stored dictionary. -- Hugh Bothwell hugh_bothwell@hotmail.com Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b++++ DI+++ D-(++) G+ e(++) h-- r- y+

« previous php.general (#151093) next »