<?php
// self_destruct.php
// RJM Programming
// July, 2018
// Thanks to The PHP Anthology Volume II: Applications

function changeExpiry($expires_when) {
   header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires_when) . 'GMT');
}

changeExpiry(10);

echo "<!doctype html><html><body style='background-color:#f0d0d0;'><h1>The Hard Edged Mission Control</h1><h3>RJM Programming - July, 2018</h3><h4>Thanks to The PHP Anthology Volume II: Applications (ISBN: 978-0-9579218-4-5) and <a target=_blank title='gfycat' href='https://gfycat.com/'>gfycat</a></h4>";
echo "<div id=dp style='background:linear-gradient(rgba(13,254,105,0.4),rgba(13,254,105,0.4)),URL('//www.rjmprogramming.com.au/wordpress/DismalSomeAlbatross-max-1mb.gif') no-repeat;background-color:rgb(13,254,105);'><p style=\"padding: 5px 5px 5px 5px;font-size:20px;background:linear-gradient(rgba(13,254,105,0.4),rgba(13,254,105,0.4)),URL('//www.rjmprogramming.com.au/wordpress/DismalSomeAlbatross-max-1mb.gif') no-repeat;background-color:rgb(76,254,136);\">Jim, do you accept today's mission?<br>To save time, we've assembled a team.<br>We've put out your garbage ... it's <br>yellow bin week.<br>We've visited the inlaws for you.<br>We're flying you JetStar Economy <br>window seats.<br>  You have 10 seconds until self destruction.<br>";
echo 'The GMT is now ' . gmdate('H:i:s') . '</p></div><br>';
echo '<script type="text/javascript">  function awisemove() {  document.getElementById(' . "'" . 'awisemove' . "'" . ').click(); }  function badmove() { document.getElementById(' . "'" . 'wisemove' . "'" . ').innerHTML=' . "'" . 'Is Batman available?!' . "'" . ';   setTimeout(awisemove,500); } setTimeout(badmove,9500); </script>';
echo '<div id=wisemove style="font-size:140px; font-color: green;"><!--img src="//www.rjmprogramming.com.au/wordpress/DismalSomeAlbatross-max-1mb.gif" title="Thanks to https://gfycat.com/gifs/tag/fuse"></img--></div><br>';
echo '<a style="text-decoration:none; cursor:pointer;font-size:24px;border:5px solid red;padding: 8px 8px 8px 8px;background-color:yellow;" onclick=" document.getElementById(' . "'" . 'wisemove' . "'" . ').innerHTML=' . "'" . 'Wise move, Jim!<br><font size=2>How time flies!  Enjoy the next mission.</font>' . "'" . '; setTimeout(awisemove,800);">Accept the mission ...</a><a id=awisemove href="' . $_SERVER['PHP_SELF'] . '"></a></body></html>';

?>
