PHP Classes

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

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/01mater/shop/ch24_guitar_shop/util/secure_conn.php  >  Download  
File: fwphp/01mater/shop/ch24_guitar_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:
Date: 2 months ago
Size: 392 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;
       
header("Location: " . $url);
        exit();
    }
?>

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