Advertisement
iAnonGuy

~ Rot13 Encoder ~

Dec 20th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.85 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head><title>~ Rot 13 Encoder ~</title></head>
  4. <body>
  5. <center>
  6. <h1 style="font-family: Monospace;">~ AnonGuy's Rot13 Encoder ~</h1>
  7. <form method="post">
  8. <textarea name="rawText" style="width: 369px; height: 257px;"></textarea><br><br><input style="width:37px;" type="submit" name="submit" value=">>" />
  9. </form>
  10. <?php
  11. $postData = $_POST['rawText'];
  12. $submit = $_POST['submit'];
  13. function r0t($userInput) {return strtr($userInput, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 'NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm');}
  14. if   (isset($postData, $submit) && $submit == '>>'){
  15. if   (ctype_alnum(str_replace(' ', '', $postData))) {echo '<h2 style="font-family: Monospace;">Output ~ </h2><code>'.r0t($postData).'</code><br><br>';}
  16. else {echo '<p>Please Input Alphanumeric Values Only!</p>';}}
  17. ?>
  18. </center></body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement