title: Sending data encrypted with MCRYPT_3DES as a URL parameter
body: <p>HI,</p>
  
  <p>I am encrypting data with following PHP function:</p>
  
  <pre><code>$enc_data = mcrypt_encrypt(MCRYPT_3DES, $_key, $_data, MCRYPT_MODE_CBC, $_iv);
  </code></pre>
  
  <p>If I send the encrypted data per <code>$_GET</code> method, it’s not possible to decrypt it back because the <code>$enc_data</code> contains <code>/</code> and <code>+</code> signs:</p>
  
  <pre><code>QBlgcQ2+v3wd8RLjhtu07ZBd8aQWjPMfTc/73TPzlyA=
  </code></pre>
  
  <p>Btw. I am using this function to transfer data between .NET 2010 and PHP.</p>
  
  <p>Any ideas how to solve this problem?</p>
  
  <hr>
  
  <p><strong>Solved!</strong>
  if someone want to know how to use <a href="http://php.net/http_build_query" rel="nofollow"><code>http_build_query()</code></a></p>
  
  <pre><code>&lt;?php
  echo "&lt;a href='test.php?".http_build_query($enc_data)."'&gt;test&lt;/a&gt;";
  
  $_data = str_replace("%3D", "=", $_GET['enc_data']);
  $_data = str_replace("%2B", "+", $_GET['enc_data']);
  $_data = str_replace("%2F", "/", $_GET['enc_data']);
  
  echo $_data;
  ?&gt;
  </code></pre>