Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- querystring cypher
March 7, 2007, 6:35 pm
rate this thread
I need to hide some info in the query string.
I've seen this repeatedly, but am unsure how this is done. Perl
example would be good. Since these aren't financial transaction, a high
level cypher is not needed. Something low on horsepower is better.
Re: querystring cypher
Brian Wakem wrote:
Yep -- this is what I've done in the past. Here's some slightly
Something along the lines of:
$email = 'email@example.com';
$hash = md5('my top-secret string'.$email);
$unsub = "http://example.net/unsub.cgi?email =$email&hash=$hash";
print "$email can unsub at $unsub";
Then in unsub.cgi you'd do:
$email = get_from_query_string('email');
$hash = get_from_query_string('hash');
$correcthash = md5('my top-secret string'.$email);
if ($hash ne $correcthash)
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
- » ********* Webmaster / programmer wanted in Miami *************
- — Next thread in » Webmaster Forum