Re: Verifying a url

From: Date: Wed, 07 Jan 2004 14:17:25 +0000
Subject: Re: Verifying a url
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173965@lists.php.net to get a copy of this message
There is a "official" variable - $_SERVER['HTTPS'] - that is defined only if https protocol is used. Ivo Pletikosic wrote:
It did not work for me but since I have only one http port and one https port on my server i use instead if( $_SERVER['SERVER_PORT'] == "80" ) echo 'http'; C.
-----Original Message----- From: Richard Davey [mailto:rich@launchcode.co.uk] Sent: Tuesday, January 06, 2004 6:56 PM To: Thomas Andersen Cc: php-general@lists.php.net Subject: Re: [PHP] Verifying a url Hello Thomas, Wednesday, January 7, 2004, 2:49:48 AM, you wrote: TA> My web site has two different ways to be accessed. One is through a SSL TA> connection and the other not. TA> Does anyone know how to check either the URL that is being used (https would TA> give away the SSL) or if you can check if SSL is being used? I'm pretty sure the following would work: if ($_SERVER['SERVER_PROTOCOL'] == "HTTP/1.1") { echo "Normal site"; } -- Best regards,
Richard                            mailto:rich@launchcode.co.uk


« previous php.general (#173965) next »