Шифровать путь к

Автор: kavadims (ICQ 4492906) Написано: 4 мес. назад Форматирование: php.
Без нумерации строк
  1. function decode_char($c)
  2. {
  3.   $a1 = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "W", "G", "X", "M", "H", "R", "U", "Z", "I", "D", "=", "N", "Q", "V", "B", "L");
  4.   $a2 = array("b", "z", "a", "c", "l", "m", "e", "p", "s", "J", "x", "d", "f", "t", "i", "o", "Y", "k", "n", "g", "r", "y", "T", "w", "u", "v");
  5.   $result = $c;
  6.   for($j = 0; $j < count($a1); $j++) {
  7.     if ($c == $a1[$j][0]) {
  8.       $result = $a2[$j][0];
  9.       break;
  10.     }
  11.     if ($c == $a2[$j][0]) {
  12.       $result = $a1[$j][0];
  13.       break;
  14.     }
  15.   }
  16.   return $result;
  17. }
  18.          
  19. function encode_str($s)
  20. {
  21.   $s = base64_encode($s);
  22.   $result = '';
  23.   for($i = 0; $i < strlen($s); $i++) {
  24.     $result .= decode_char($s[$i]);
  25.   }
  26.   return $result;
  27. }
  28. $url = encode_str($url);
  29.         if ($comment == "")
  30.             {
  31.                 return "<object id="video" дальше сами..