Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // шифр Цезаря со сдвигом на позции букв в слове radmin
- $alpha = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";
- $eng = "abcdefghijklmnopqrstuvwxyz";
- $s = "бпесмнтммфун";
- $r = "radmin";
- $text = "";
- for ($i=0; $i<strlen($s); $i++) {
- $text = $text . $alpha[ (strpos($alpha,$s[$i % strlen($s)]) + strlen($alpha) - strpos($eng,$r[$i % strlen($r)]) - 1 ) % strlen($alpha) ];
- }
- echo iconv("Windows-1251","CP866",$text);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement