<!DOCTYPE html>
<?php
   $base_url = str_replace($_SERVER['DOCUMENT_ROOT'], "", dirname($_SERVER['PHP_SELF']));
   $http_url = "http://".$_SERVER['HTTP_HOST'].$base_url;
?>
<html>
   <head>
      <!-- Mixed-content CSS. -->
      <link rel="stylesheet" href="<?=$http_url?>/style.css">

      <!-- Mixed-content Font. -->
      <style>
         @font-face {
            font-family: "myfont1";
            src: url("<?=$http_url?>/font.ttf") format("truetype");
         }

         /* (Not available on IE11) document.fonts.check('1em myfont1') equals TRUE if font is loaded. */
         p {
            font-family: "myfont1";
         }
      </style>
   </head>
   <body>
      <p id="text1">This page needs to be loaded in HTTPS domain.</p>

      <!-- Mixed-content Image. -->
      <div>
         <img id="image1" width="200" height="112" src="<?=$http_url?>/image.jpg">
      </div>

      <!-- Mixed-content Audio. -->
      <div>
         <audio id="audio1" controls src="<?=$http_url?>/audio.mp3"></audio>
      </div>

      <!-- Mixed-content Video. -->
      <div>
         <video id="video1" width="200" height="112" src="<?=$http_url?>/video.mp4"></video>
      </div>
   </body>
</html>
