Hi,

        if ($_SERVER["HTTPS"] != "on") {
                $newurl = "https://"; . $_SERVER["SERVER_NAME"] .
$_SERVER["REQUEST_URI"];
                header("location: $newurl");
                die;
        }

That's how I do it..

-Dan Joseph 

> Is there a way to detect if a browser is using a HTTPS or 
> HTTP. As i can get the scripts self and the host its running 
> off but i cannot seem to find a way to grab if the connection 
> is secure or not.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to