<?php
  // The Three P's meet Macbeth Act 1 Scene 1 by William Shakespeare - RJM Programming - May, 2014
  
  function shorten($inc) {
    if (strlen(str_replace("rjmprogramming.com.au", "", $_SERVER['SERVER_NAME'])) != strlen($_SERVER['SERVER_NAME'])) {
     return str_replace("First Witch", "FW", str_replace("Second Witch", "SW", str_replace("Third Witch", "TW", str_replace("http://www.rjmprogramming.com.au/", "/", $inc))));
    } 
    return str_replace("First Witch", "FW", str_replace("Second Witch", "SW", str_replace("Third Witch", "TW", $inc)));
  }
  
  function lengthen($inc) {
    return str_replace("FW", "First Witch", str_replace("SW", "Second Witch", str_replace("TW", "Third Witch", $inc)));
  }
  
  function server_remote_addr() {
    $rma = $_SERVER['REMOTE_ADDR'];
    $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
    // you can add different browsers with the same way ..
    if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
            $rma = '000000'.$rma;
    elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
            $rma = '00000'.$rma;
    elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
            $rma = '0000'.$rma;
    elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
            $rma = '000'.$rma;
    elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
            $rma = '00'.$rma;
    elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
            $rma = '0'.$rma;
    return str_replace(".","",$rma);
  }

  $suffix = "";
  $subplace = "/";
  if (strlen(str_replace("rjmprogramming.com.au", "", $_SERVER['SERVER_NAME'])) == strlen($_SERVER['SERVER_NAME'])) {
   $subplace = "/";
  } else {
   $subplace = "/PHP/";
   $suffix = server_remote_addr();
  }
  $stage = 0;
  $origurl = "http://www.rjmprogramming.com.au/junk.html";
  $anarray = array("rain", "hurlyburly", "ere", "Where", "Upon", "There", "Graymalkin", "Paddock", "Anon", "foul", "Exeunt");
   
  $meta = "<html>";
  $meta .= "<head>";
  $meta .= "<title>Macbeth Act 1 Scene 1 by William Shakespeare</title>";
  $meta .= '<META http-equiv="refresh" content="3;URL=' . $origurl . '">';
  $meta .= '<style> img { opacity: 0.3; filter: alpha(opacity = 30); } </style>';
  $meta .= "</head><body align='center' style='background-color: black;'><div align='center'><a target=_blank href=\"https://www.flickr.com/photos/arbron/66697520/in/photolist-5iSphL-6TQRf-5TK2Do-5TMPAn-5TSamJ-5TMPvM-5TMPDt-7CDip-5T2zrS-67g614-5TK2QL-5U1xiu-5UhhUG-5UhhxW-5UhhKs-5Uc8q6-5TN8by-5TEKWn-5TSa2d-5TMZcu-5TdSVN-5TPcPh-5U2QP1-74VJ52-7EaaYg-5TQT1C-5TEKQv-5TQdu3-5Uc8eP-5Ugury-5TKTbr-5UguCC-5TEFZ6-5TK2r7-5UguB5-5TtjkA-5TRfKS-5Uc7J2-6vFC9T-6vKQd9-6TQXQ-abDgmQ-5TSaFq-6TQUC-c8yAH-6TQK3-6TQDJ-3HwkWt-bxZcJo-bxZd55\" title=\"Background image courtesy of Jeff Hitchcock at flickr at https://www.flickr.com/photos/arbron/66697520/in/photolist-5iSphL-6TQRf-5TK2Do-5TMPAn-5TSamJ-5TMPvM-5TMPDt-7CDip-5T2zrS-67g614-5TK2QL-5U1xiu-5UhhUG-5UhhxW-5UhhKs-5Uc8q6-5TN8by-5TEKWn-5TSa2d-5TMZcu-5TdSVN-5TPcPh-5U2QP1-74VJ52-7EaaYg-5TQT1C-5TEKQv-5TQdu3-5Uc8eP-5Ugury-5TKTbr-5UguCC-5TEFZ6-5TK2r7-5UguB5-5TtjkA-5TRfKS-5Uc7J2-6vFC9T-6vKQd9-6TQXQ-abDgmQ-5TSaFq-6TQUC-c8yAH-6TQK3-6TQDJ-3HwkWt-bxZcJo-bxZd55 ... thanks\"><img align='center' src=\"http://www.rjmprogramming.com.au/PHP/66697520_c45d1ff78a_b.jpg\" title=\"Background image courtesy of Jeff Hitchcock at flickr at place that image click takes you ... thanks.  Thunder sounds thanks to http://soundbible.com/1907-Thunder.html at SoundBible.   Sound mp3 to ogg free conversion thanks to http://www.online-convert.com/result/5ffdcdd4e819f0db2c902a677656d0b5\"></img></a></div>\n";
  $meta .= '<div align="center" style="opacity: 1.0; margin-top: 0px; position: absolute; top: 0px; left: 200px;"><font face="Snell Roundhand" color="red"><b>';
  
  $meta2 .= '<div id="player">';
  $meta2 .= '<audio id="audio" controls="controls" autoplay="autoplay" loop="loop" style="width:150px;display:none;">';
  $meta2 .= '<source src="http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.ogg" type="audio/ogg" />';
  $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
  // you can add different browsers with the same way ..
  if (strpos($ua, "msie") !== false) {
      $meta2 .= '<source src="http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.mp3" type="audio/mp3" />'."\n";
      $meta2 .= '<embed src="http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.mp3" hidden="true" loop="TRUE" autostart="TRUE"></embed>'."\n";
  } else if (strpos($ua, "mozilla") !== false) {
      $meta2 .= '<source src="http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.wav" type="audio/wav" />'."\n";
      $meta2 .= '<embed src="http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.wav" hidden="true" loop="TRUE" autostart="TRUE"></embed>'."\n";
  } else {
      $meta2 .= '<source src="http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.mp3" type="audio/mp3" />'."\n";
      $meta2 .= '<embed src="http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.mp3" hidden="true" loop="TRUE" autostart="TRUE"></embed>'."\n";
  }
  $meta2 .= '</audio></div>';
  $gt = "";
  $aa = "";
  $tts = "";
  if (isset($_GET['thingtosay'])) {
     $tts = $_GET['thingtosay'];
  }
  if (file_exists(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html")) {
     $gt = file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html");
  }
      if (file_exists(dirname(__FILE__) . "/aatest" . $suffix . ".html")) {
        $aa = file_get_contents(dirname(__FILE__) . "/aatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/aaatest" . $suffix . ".html")) {
        $aa = file_get_contents(dirname(__FILE__) . "/aaatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/aaaatest" . $suffix . ".html")) {
        $aa = file_get_contents(dirname(__FILE__) . "/aaaatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/aaaaatest" . $suffix . ".html")) {
        $aa = file_get_contents(dirname(__FILE__) . "/aaaaatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/aaaaaatest" . $suffix . ".html")) {
        $aa = file_get_contents(dirname(__FILE__) . "/aaaaaatest" . $suffix . ".html");
      }

  
  if (!isset($_GET['thingtosay']) && $aa == "") {  // Python = First Witch
   if (file_exists(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) {
     unlink(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
   }
   if (file_exists(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html")) {
     unlink(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html");
   }
   
   exec("/usr/bin/python " . dirname(__FILE__) . "/conversation1.py >> " . dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
   
   file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta . $meta2) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm") . "</body></html>");
   header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
  } else if (isset($_GET['stage']) || (strlen(str_replace("stage=", "", $gt)) != strlen($gt) && $aa != "")) {
   $bits = explode('"', $tts);
   $bitss = explode('stage=', $gt);
   //$origurl = str_replace("3;URL=", "", $bits[4]);
   if (isset($_GET['stage'])) {
     $stage = $_GET['stage'];
   } else {
     $bitsa = explode('&', $bitss[1]);
     $stage = $bitsa[0];
   }
   $sofar = file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
   if (strlen(str_replace($anarray[$stage + 1], "", $sofar)) == strlen($sofar)) {
   $stage = $stage + 1;
   if ($stage == 1) { // PHP = Second Witch
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm", lengthen(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm") . "<i>Second Witch: </i>When the hurlyburly's done, <br>When the battle's lost and won.<br><br>"));
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 2) { // Perl = Third Witch
     exec("/usr/bin/perl " . dirname(__FILE__) . "/conversation1.perl >> " . dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta . $meta2) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 3) { // back to First Witch
     exec("/usr/bin/python " . dirname(__FILE__) . "/conversation2.py >> " . dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 4) { // back to Second Witch
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm", lengthen(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm") . "<i>Second Witch: </i>Upon the heath.<br><br>"));
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 5) { // back to Third Witch
     exec("/usr/bin/perl " . dirname(__FILE__) . "/conversation2.perl >> " . dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta . $meta2) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 6) { // back to First Witch
     exec("/usr/bin/python " . dirname(__FILE__) . "/conversation3.py >> " . dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/aatest" . $suffix . ".html", file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm"));
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 7) { // back to Second Witch
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm", lengthen(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm") . "<i>Second Witch: </i>Paddock calls.<br><br>"));
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/aaatest" . $suffix . ".html", file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm"));
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 8) { // back to Third Witch
     exec("/usr/bin/perl " . dirname(__FILE__) . "/conversation3.perl >> " . dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/aaaatest" . $suffix . ".html", file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm"));
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 9) { // back to Second Witch
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm", lengthen(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm") . "<i>All: </i>Fair is foul, and foul is fair:<br>Hover through the fog and filthy air.<br><br>"));
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/aaaaatest" . $suffix . ".html", file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm"));
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta . $meta2) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 10) { // back to Second Witch
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm", lengthen(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm") . "<h3><i>[Exeunt.</i></h3></b></font></div>"));
     //sleep(2);
     file_put_contents(dirname(__FILE__) . "/aaaaaatest" . $suffix . ".html", file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm"));
     file_put_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html", lengthen(str_replace($origurl, "./conversation_supervisor.php?stage=" . $stage . "&thingtosay=" . rawurlencode (shorten(file_get_contents("http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".htm"))), $meta) . file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) . "</body></html>");
     header("Location: http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $subplace . "macbeth_act1_scene1" . $suffix . ".html");
   } else if ($stage == 11) {
     echo file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html");
     sleep(1);
     if ($suffix != "") {
      if (file_exists(dirname(__FILE__) . "/aatest" . $suffix . ".html")) {
        unlink(dirname(__FILE__) . "/aatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/aaatest" . $suffix . ".html")) {
        unlink(dirname(__FILE__) . "/aaatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/aaaatest" . $suffix . ".html")) {
        unlink(dirname(__FILE__) . "/aaaatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/aaaaatest" . $suffix . ".html")) {
        unlink(dirname(__FILE__) . "/aaaaatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/aaaaaatest" . $suffix . ".html")) {
        unlink(dirname(__FILE__) . "/aaaaaatest" . $suffix . ".html");
      }
      if (file_exists(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm")) {
        unlink(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".htm");
      }
      if (file_exists(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html")) {
        unlink(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html");
      }
     }
   }
   } else {
     echo file_get_contents(dirname(__FILE__) . "/macbeth_act1_scene1" . $suffix . ".html");
   }
  }
?>
