Re: checking for and enforcing https

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 26, 2008 at 11:12 AM, Jim Lucas <lists@xxxxxxxxx> wrote:
>  And it doesn't say "off".  It either exists or doesn't.
>
>  if ( isset($_SERVER['HTTPS']) ) {
>         // Is using SSL
>  } else {
>         // Is NOT using SSL
>  }

    Almost correct.

    From http://php.net/reserved.variables :

 'HTTPS'
    Set to a non-empty value if the script was queried through the
HTTPS protocol. Note that when using ISAPI with IIS, the value will be
off if the request was not made through the HTTPS protocol.

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux