title: How to encrypt an decrypt url in php
body: <p>Passing 1000 of array variables through url and getting it back in another page.how can i encrypt url which is dynamically creating and de crypt back to original stage for further querying.
  my url is look like this :</p>
  
  <p><a href="http://example.com/abc/abc1.php?808=880&amp;807=879&amp;806=878&amp;805=877&amp;804=876&amp;803=875&amp;802=872&amp;801=871&amp;800=869&amp;799=868&amp;798=867&amp;797=866&amp;796=865&amp;795=864&amp;794=863&amp;793=862&amp;792=861&amp;791=860&amp;790=859&amp;789=858&amp;788=857&amp;787=856&amp;786=855&amp;785=854&amp;784=853&amp;783=852&amp;782=850&amp;781=849&amp;780=848&amp;779=847&amp;778=846&amp;777=845&amp;776=844&amp;775=843&amp;774=842&amp;773=841&amp;772=840" rel="nofollow">http://example.com/abc/abc1.php?808=880&amp;807=879&amp;806=878&amp;805=877&amp;804=876&amp;803=875&amp;802=872&amp;801=871&amp;800=869&amp;799=868&amp;798=867&amp;797=866&amp;796=865&amp;795=864&amp;794=863&amp;793=862&amp;792=861&amp;791=860&amp;790=859&amp;789=858&amp;788=857&amp;787=856&amp;786=855&amp;785=854&amp;784=853&amp;783=852&amp;782=850&amp;781=849&amp;780=848&amp;779=847&amp;778=846&amp;777=845&amp;776=844&amp;775=843&amp;774=842&amp;773=841&amp;772=840</a>                                                                                </p>
  
  <p>Code:</p>
  
  <pre><code>$rfinalarray = array_intersect($rarray1, $rarray2, $rarray3, $rarray4, $rarray5, $rarray6, $rarray7, $rarray8, $rarray9, $rarray10, $rarray12, $rarray13, $rarray14, $rarray15, $rarray16, $rarray17);
  if (count($rfinalarray) &gt; 0) {
      $arrayr = array_values($rfinalarray);
      arsort($arrayr);
      $ab = http_build_query($arrayr);
  
      header("HTTP/1.1 301 Moved Permanently");
      header("Location: http://example.com/abc.php?$ab");
  } else {
      header("HTTP/1.1 301 Moved Permanently");
      header("Location: http://example.com/abc.php?search=noresult");
      unset($_SESSION['reals']);
  }
  </code></pre>