<?php                                                                              

/**         
* @desc This file will enable IP scrambling in order to comply with German Law. 
*/
if(!defined('APP_INCLUDE')){ die('invalid inclusion'); }

function encodeSPQR($ip) {
      $start=0;
      $gip="";
      do { 
          $l= substr($ip,$start,1);         
          $gip .= chr(ord($l)+22);
          $start++;        
      } while (strlen(substr($ip,$start,1)) > 0);
      return $gip;       
}
  
function decodeSPQR($ip) {
    $start=0;
    $rip="";
    do { 
          $l= substr($ip,$start,1);         
          $rip .= chr(ord($l)-22);
          $start++;        
    } while (strlen(substr($ip,$start,1)) > 0);
    return $rip;  
}

?>
