RE: [PHP] Verifying a url
| From: | Ivo Pletikosic | Date: | Wed, 07 Jan 2004 03:08:35 +0000 |
| Subject: | RE: [PHP] Verifying a url | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-173939@lists.php.net to get a copy of this message | ||
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