PX : code

rot13 by Christopher Heschong
Download this code


<?php

Function rot13($string) {
 for(
$i=0;$i<strlen($string);$i++) {
  
$j=ord($string[$i]);
  if (((
$j>=ord("n")) & ($j<=ord("z"))) | ($j>=ord("N")) & ($j<=ord("Z"))) {
   
$j=$j-13;
  }
  elseif (((
$j>=ord("a")) & ($j<=ord("m"))) | ($j>=ord("A")) & ($j<=ord("M"))) {
   
$j=$j+13;
  }
  
$new.=chr($j);
 }
 return(
$new);
}

?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.