Re: most reliable way to test if using https

From: Date: Sat, 14 Jan 2006 04:20:27 +0000
Subject: Re: most reliable way to test if using https
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-228606@lists.php.net to get a copy of this message
James Benson wrote:
What is the most reliable way to test if a connection is already using the https protocol, is their a PHP constant or something builtin already? Thanks, James Something like?
if (isset($_SERVER["HTTPS"]) && 'on' == $_SERVER["HTTPS"]) {// ssl } else { // non-ssl }

« previous php.general (#228606) next »