Re: checking for and enforcing https

From: Date: Tue, 26 Feb 2008 16:41:36 +0000
Subject: Re: checking for and enforcing https
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-270191@lists.php.net to get a copy of this message
On Tue, Feb 26, 2008 at 11:12 AM, Jim Lucas <lists@cmsws.com> 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); } ?>

« previous php.general (#270191) next »