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:[EMAIL PROTECTED] 
> Sent: Tuesday, January 06, 2004 6:56 PM
> To: Thomas Andersen
> Cc: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]

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

Reply via email to