<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>THE YELLOW PAGES</title>
    <link href="style.css" rel="stylesheet">
    <link href="icon.png" rel="icon">
  </head>
  <body id="index">
    <div class="centercubepleaseind">
      <h1>Silly fake ads:</h1>
      <p style="text-align: left;">
      <?php
        $adslist = fopen("ads/ads", "r") or die("Unable to open file!");
        // Output one line until end-of-file
        while(!feof($adslist)) {
            $adarray[] = fgets($adslist);
        }
        fclose($adslist);
        foreach($adarray as $adunit){
          echo $adunit;
          echo "<br>";
        }
      ?>
     </p>
   </div>
  </body>
</html>
