Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <html>
  2. <head></head>
  3. <body>
  4. <?php
  5. $tekst = $_GET["text"];
  6. $przesuniecie = $_GET["key"];
  7. $nowytekst = $tekst;
  8. for ($i=0;$i<strlen($tekst);$i++) {
  9.  
  10. $ascii = ord($tekst[$i]);
  11. for($j=0;$j<$przesuniecie;$j++){
  12. if ($ascii >= 65 && $ascii <= 90) {
  13. if($ascii == 90) {
  14. $ascii = 65;
  15. }
  16. else $ascii++;
  17. }
  18. else if ($ascii >= 97 && $ascii <= 122) {
  19. if($ascii == 122) {
  20. $ascii = 97;
  21. }
  22. else $ascii++;
  23. }
  24. else if ($ascii >= 48 && $ascii <= 57) {
  25. if($ascii == 57) {
  26. $ascii = 48;
  27. }
  28. else $ascii++;
  29. }
  30. else $ascii == $ascii;
  31. }
  32. $nowytekst[$i] = chr($ascii);
  33.  
  34. }
  35. echo $nowytekst;
  36. ?>
  37. </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement