Arris

ABACABA PHP

Oct 10th, 2012
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2. /**
  3. Use: i = depth
  4. */
  5. define('A_CODE',ord("A")-1);
  6.  
  7. class abacaba
  8. {
  9. var $Dictionary = array('');
  10.  
  11. function __construct($depth)
  12. {
  13. for ($i=1;$i<=$depth;$i++)
  14. $this->Dictionary[]=chr(A_CODE+$i);
  15. }
  16.  
  17. function getit($depth)
  18. {
  19. if (0==$depth) return $this->Dictionary[0];
  20. return $this->getit($depth-1) . $this->Dictionary[$depth] . $this->getit($depth-1);
  21. }
  22. }
  23.  
  24. $x = new abacaba(25);
  25.  
  26. $message = $x->getit($_GET['x']);
  27.  
  28. echo <<<HERE
  29.  
  30. <html>
  31. <body>
  32. <textarea autofocus cols="100" rows="30" wrap="soft" spellcheck="false">
  33. $message
  34. </textarea>
  35. <br>
  36. Lenght: $len
  37. </body>
  38.  
  39. </html>
  40.  
  41. HERE;
  42. ?>
Advertisement
Add Comment
Please, Sign In to add comment