<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<title>randohmizer</title>
<style>
body {
  padding-left: 20px;
}
#smallprint {
  color: grey;
  font-size: 0.75em;
}
</style>

</head>
<body>

<div>
  <h1>Embiggen your spirit by watching:</h1>
<?php

$randomSeason = rand(1, 33);

if ($randomSeason == 1) {
$episodesInSeason = '13';
} elseif ($randomSeason == 2 or 4 or 5 or 11 or 13 or 14 or 15 or 17 or 18 or 22 or 23 or 24 or 25 or 26 or 27 or 28 or 31 or 32 or 33 ) {
$episodesInSeason = '22';
} elseif  ($randomSeason == 3) {
$episodesInSeason = '24';
} elseif  ($randomSeason == 6 or 7 or 8 or 9) {
$episodesInSeason = '25';
} elseif  ($randomSeason == 10 or 21 or 30) {
$episodesInSeason = '23';
} elseif  ($randomSeason == 12 or 16 or 20 or 29) {
$episodesInSeason = '21';
} else {
$episodesInSeason = '20';
}

$randomEpisode = rand(1, $episodesInSeason);

echo 'Season ' . $randomSeason . ', episode ' . $randomEpisode;
?>
</div>
<div>
<p><button onClick="window.location.reload();">That one isn't cromulent enough</button></p>

<p id="smallprint">randohmizer is meant to give you a random season and episode of The Simpsons to go watch. How you watch it is up to you.  </p>
</div>
</body>

</html>