Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function rot26($input){
- for($i = 0; $i < strlen($string); $i++){
- $asc = ord($string[$i]);
- if($asc > 96 && $asc < 123){
- $offset = 97;
- }else if($asc > 64 && $asc < 91){
- $offset = 65;
- }else{
- $output .= $string[$i];
- continue;
- }
- $asc = (((($asc - $offset) + 23) % 26) + $offset);
- $output .= chr($asc);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement