passing openssl_encrypt encrypted data as query string
<p>I am using openssl_encrypt and openssl_decrypt functions to encrypt and decrypt the id passed as querystring. But in some cases the encrypted query string contains '+' character. which causes problem in the openssl_decrypt function  and I gets the following warning.</p>

<pre><code>$x = openssl_encrypt ('3', 'AES-256-CBC', $password,0, $iv);
echo openssl_decrypt ($x, 'AES-256-CBC', $password,0, $iv);
</code></pre>

<p><strong>Warning:  openssl_decrypt(): Failed to base64 decode the input</strong></p>

<p>Please let me know if there is any other method to encrypt data without this '+' characters. Also I want to limit the character length of the encrypted id below 100.</p>