Guest User

Michael Craft

a guest
Mar 2nd, 2009
218
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // Poem Generator
  3. // Michael Craft
  4. // 3/2/09
  5. // This code is realeased under the MIT license, which gives you the right to use, distribute, and modify as long as you give me credit.
  6.  
  7. $article = array("the","a","an","some","any");
  8. $adj = array("purple","stinky","stupid","fat","nasty","ugly","awesome","cool","hot","cold","green","blue","dead","soft","hard","wet","dry","black","white","racist","alive","squishy","skinny","round","square","triangular","technologic");
  9. $noun = array("cat","dog","bat","hat","rat","table","pen","pencil","crayon","folder","computer","backpack","paper","stapler","USB drive","pencil sharpener","chair","car","pool","ball","light","lamp","cord","plug","spike","bomb","fuse","mummy","skeleton","keyboard","taco","xylophone","trombone","trumpet","tuba","afro","elephant","girrafe","zebra");
  10. $verb = array("run","jump","shoot","sprint","talk","die","explode","stab","trip","fall","play","move","type","print","eat","drink","punch","kick","point","make","create","cook","turn","drive","touch","bring","pay","watch","leave","stop","format","buy","use","break","fix","trash","change","mail","upgrade","charge","point","zoom","press","snap","work","erase","write","cut","paste","save","load","check","rewrite","plug","play","burn","rip","drag","drop","zip","unzip");
  11. $prep = array("at","in","from","with","by","about","under","along","before","of");
  12.  
  13. $final = <<<EOD
  14. {$article[array_rand($article)]} {$adj[array_rand($adj)]} {$noun[array_rand($noun)]}<br />
  15. {$verb[array_rand($verb)]} like {$article[array_rand($article)]} {$noun[array_rand($noun)]}<br />
  16. {$prep[array_rand($prep)]} {$noun[array_rand($noun)]}<br />
  17. I {$verb[array_rand($verb)]}<br />
  18. {$prep[array_rand($prep)]} {$noun[array_rand($noun)]}<br />
  19. and {$verb[array_rand($verb)]}<br />
  20. {$prep[array_rand($prep)]} {$noun[array_rand($noun)]}<br />
  21. {$article[array_rand($article)]} {$noun[array_rand($noun)]} was like {$article[array_rand($article)]} {$noun[array_rand($noun)]}<br />
  22. the {$noun[array_rand($noun)]}<br />
  23. {$verb[array_rand($verb)]}<br />
  24. {$prep[array_rand($prep)]} {$noun[array_rand($noun)]}
  25. EOD;
  26. ?>
  27.  
  28. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  29. <html xmlns="http://www.w3.org/1999/xhtml">
  30.     <head>
  31.         <title>Poem Generator</title>
  32.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  33.         <link rel="stylesheet" type="text/css" href="../peak15.css" />
  34.     </head>
  35.    
  36.     <body>
  37.         <h1>Poem Generator</h1>
  38.         <h3>By Michael Craft</h3>
  39.        
  40.         <p><?php echo $final; ?></p>
  41.        
  42.         <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11-blue" alt="Valid XHTML 1.1" height="31" width="88" /></a>
  43.         <a href="http://jigsaw.w3.org/css-validator/check/referer">
  44.         <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /></a></p>
  45.     </body>
  46. </html>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×