HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/bt667/public_html/wp-content/plugins/old24-flying-pages/settings/compatibility.php
<?php
function flying_pages_compatibility() {

  $url = home_url();
  $url_protocol = parse_url($url)['scheme'];
  $headers = get_headers($url, 1);
  $cache_control_header = isset($headers["Cache-Control"]) ? $headers["Cache-Control"] : "";

  ?>

  <h3>HTTPS Check</h3>
  <?php 
    if($url_protocol === "https")
      echo '<p style="color:green">✅ Your website is served over HTTPS</p>';
    else 
      echo '<p style="color:red">❌ Your website is not served over HTTPS</p>';
  ?>
  

  <h3>Cache-Control Check</h3>
  <?php
    if(strpos($cache_control_header, 'no-store') === false)
      echo '<p style="color:green">✅ "no-store" is not found in your Cache-Control response header</p>';
    else {
      echo '<p style="color:red">❌ "no-store" is found in your Cache-Control response header. Please contact your hosting provider to remove this.</p>';
      echo "<p>Current Cache-Control: <code>{$cache_control_header}</code></p>";
      echo "<p>Suggested Cache-Control: <code>no-cache, must-revalidate, max-age=0</code></p>";
    }
}
?>