jakebur01 Posted August 14, 2007 Share Posted August 14, 2007 If I have something that I need to pass through the url what would be the best way to encrypt it? Quote Link to comment https://forums.phpfreaks.com/topic/64913-solved-passing-through-url/ Share on other sites More sharing options...
Daniel0 Posted August 14, 2007 Share Posted August 14, 2007 Depends. If you need to decrypt it, then you'll need mcrypt. MD5 or SHA1 for one-way encryption. base64_encode and base64_decode for "not secure" encryption (it's not really encryption though). Quote Link to comment https://forums.phpfreaks.com/topic/64913-solved-passing-through-url/#findComment-323897 Share on other sites More sharing options...
micah1701 Posted August 14, 2007 Share Posted August 14, 2007 is it just a number? you could obfuscate it by multiplying it by some "key" number. then pass it and divide by that same key on the next page. Quote Link to comment https://forums.phpfreaks.com/topic/64913-solved-passing-through-url/#findComment-323901 Share on other sites More sharing options...
gurroa Posted August 14, 2007 Share Posted August 14, 2007 Simple don't do it. Use session, dbase or plain file. If user can see it but should not change it, use md5 check method $url = 'viewarticle.php?id='.$id.'&check='.md5(md5('my'.$id.'test'.$id)); and test it on the other side. Quote Link to comment https://forums.phpfreaks.com/topic/64913-solved-passing-through-url/#findComment-323903 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.