PHP Classes

File: fwphp/01mater/shop/util/secure_conn.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/01mater/shop/util/secure_conn.php  >  Download  
File: fwphp/01mater/shop/util/secure_conn.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: ver 7.0.1 mnu, msg, mkd FUNCTIONAL namespaces, CRUD PDO trait, pretty URL-s
Date: 3 months ago
Size: 431 bytes
 

Contents

Class file image Download
<?php
// make sure the page uses a secure connection
$https = filter_input(INPUT_SERVER, 'HTTPS');
if (!
$https) {
   
$host = filter_input(INPUT_SERVER, 'HTTP_HOST', FILTER_SANITIZE_STRING);
   
$uri = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_STRING);
   
//$url = 'https://' . $host . $uri;
         // https to work : TODO...
   
$url = 'http://' . $host . $uri;
   
header("Location: " . $url);
    exit();
}
?>

For more information send a message to info at phpclasses dot org.