OpenSencillo  2015.009
Long live the simplicity of PHP
 All Data Structures Namespaces Files Functions Pages
main-config.php
1 <?php
13 define('PAGE',$_GET["p"]);
14 define("USER_IP",$_SERVER["REMOTE_ADDR"]);
15 define("USER_BROWSER",$_SERVER["HTTP_USER_AGENT"]);
16 if(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
17 {
18  $protocol = 'https://';
19 }
20 else
21 {
22  $protocol = 'http://';
23 }
24 define("PROTOCOL",$protocol);
25 ?>