Advertisement
NettleSoup

Untitled

Mar 10th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.35 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4. <head>
  5.  
  6. <meta http-equiv="content-type"
  7.         content="text/html;charset=utf-8">
  8.  
  9. <title>What should I build? Minecraft idea generator!</title>
  10.  
  11. <link rel="stylesheet" href="http://build-what.com/style.css" media="all">
  12. <link rel="icon" href="http://build-what.com/favicon.ico">
  13.  
  14. </head>
  15. <body>
  16.  
  17. <div class="result">
  18. <?php
  19. $open_line = file("arrays/open_line.txt", FILE_IGNORE_NEW_LINES);
  20. $size = file("arrays/size.txt", FILE_IGNORE_NEW_LINES);
  21. $many = file("arrays/many.txt", FILE_IGNORE_NEW_LINES);
  22. $build = file("arrays/build.txt", FILE_IGNORE_NEW_LINES);
  23. $mats = file("arrays/mats.txt", FILE_IGNORE_NEW_LINES);
  24. $biome = file("arrays/biome.txt", FILE_IGNORE_NEW_LINES);
  25. $decormat = file("arrays/decormat.txt", FILE_IGNORE_NEW_LINES);
  26. $embelish = file("arrays/embelish.txt", FILE_IGNORE_NEW_LINES);
  27. $embelishloc = file("arrays/embelishloc.txt", FILE_IGNORE_NEW_LINES);
  28. $feature = file("arrays/feature.txt", FILE_IGNORE_NEW_LINES);
  29. $nearby = file("arrays/nearby.txt", FILE_IGNORE_NEW_LINES);
  30. $by = file("arrays/by.txt", FILE_IGNORE_NEW_LINES);
  31. $statue = file("arrays/statue.txt", FILE_IGNORE_NEW_LINES);
  32.  
  33. shuffle($open_line); $open_ran = $open_line[1];
  34. shuffle($size); $size_ran = $size[1];
  35. shuffle($many); $many_ran = $many[1];
  36. shuffle($build); $build_ran = $build[1];
  37. shuffle($mats); $mats_ran = $mats[1];
  38. shuffle($biome); $biome_ran = $biome[2];
  39. shuffle($decormat); $decormat_ran = $decormat[1];
  40. shuffle($embelish); $embelish_ran = $embelish[1];
  41. shuffle($embelishloc); $embelishloc_ran = $embelishloc[1];
  42. shuffle($feature); $feature_ran = $feature[1];
  43. shuffle($nearby); $nearby_ran = $nearby[1];
  44. shuffle($by); $by_ran = $by[1];
  45. shuffle($statue); $statue_ran = $statue[1];
  46.  
  47. $output = array (
  48.                 "$open_ran $size_ran $build_ran out of $mats_ran. Put it $by_ran $biome_ran, and make sure there's a $feature_ran $nearby_ran.\n <br><br> \n There should be a $embelish_ran $decormat_ran $embelishloc_ran"
  49.                     ,
  50.                 "$open_ran $size_ran $build_ran out of $mats_ran. Put it $by_ran $biome_ran, and make sure there's a $feature_ran $nearby_ran.\n <br><br> \n There should be a $embelish_ran $decormat_ran $embelishloc_ran"
  51.                 ,
  52.                 "$open_ran $many_ran $build_ran" . "s out of $mats_ran. Put them $by_ran $biome_ran or " . array_shift($by) . " " . array_shift($biome) . ", and make sure there's a $feature_ran $nearby_ran.\n <br><br> \n There should be a $embelish_ran $decormat_ran $embelishloc_ran."
  53.                 ,
  54.                 "$open_ran $many_ran $build_ran" . "s out of $mats_ran. Put them $by_ran $biome_ran or " . array_shift($by) . " " . array_shift($biome) . ", and make sure there's a $feature_ran $nearby_ran.\n <br><br> \n There should be a $embelish_ran $decormat_ran $embelishloc_ran and maybe $size_ran " .array_shift($build) . " in the distance."
  55.                 ,
  56.                 "$open_ran $size_ran statue of $statue_ran out of $mats_ran."
  57.                 ,
  58.                 "$open_ran $size_ran statue of $statue_ran holding " . array_shift($statue) . ", out of $mats_ran. Make sure it's $by_ran $biome_ran!"
  59.                 );
  60.                    
  61. shuffle($output); $output = $output[1];
  62.  
  63. // and here we are!
  64.  
  65. echo $output
  66.  
  67. ?>
  68. </div>
  69.  
  70. <div class="footer">Made by Nettle. Send suggestions to <a href="mailto:nettle@build-what.com/?subject=MC Idea Generator">nettle@build-what.com</a> : <a href="/about">About</a></div>.
  71. </body>
  72. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement