PHP - Plus sign with GET query
- by Nate Shoffner
I have a PHP script that does basic encryption of a string through the method below:
<?php
$key = 'secretkey';
$string = $_GET['str'];
if ($_GET['method'] == "decrypt")
{
$output = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5(md5($key))), "\0");
}
if ($_GET['method'] == "encrypt")
{
…