On Tue, 6 Jan 2004, 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';

Here's a way you could write it in your script...
$is_secure = ($_SERVER['SERVER_PORT']==443) ? true : false ;

If you decide to use SERVER_PORT to sense secure connections, this logic 
would work well. It only depends on knowing the port you consider secure.
For typical https, that would be port 443. Enjoy!

-- 
Kelly Hallman
// Ultrafancy

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

Reply via email to