Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/04/2012, 15:42
Avatar de ahaugas
ahaugas
 
Fecha de Ingreso: agosto-2011
Ubicación: Madrid
Mensajes: 249
Antigüedad: 12 años, 9 meses
Puntos: 21
Pregunta problema con la clase https

hola, he hecho una clase de verificacion del usuario y la verificacion del protocolo https si ambos coinciden este se redirige a la zona segura https.

hasta aqui la teoria pero en la practica se queda mudo no habla jejejej
aver si me podeis hechar una mano porfavor

Código PHP:
<?php
    
class websiteHttps {
        var 
$https;
        var 
$protocol;
        var 
$host;
        var 
$url;
        
        function 
website_Https() {
            global 
$website_https,$loggedInUser;
            
$this->https                     $website_https;
            
$this->protocol                 htmlentities($_SERVER["HTTPS"]);
            
$this->host                     htmlentities($_SERVER["HTTP_HOST"]);
            
$this->url                         htmlentities($_SERVER["REQUEST_URI"]);
            
            if(!
isUserLoggedIn()) { } else { 
            if (
$this->https  && isset($this->protocol)){
              
header('Strict-Transport-Security: max-age=500');
                } elseif (
$this->https  && !isset($this->protocol)){
              
header('Status-Code: 301');
              
header('Location: https://'.$this->host.$this->url);
                }
            }
        } 
    }
        
    
$websiteHttpsSec = new websiteHttps();
    
$websiteHttpsSec->website_Https();
?>

sin la clase funciona pero con ella todo junto no y no se que falla