RE: [PHP] Verifying a url

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

« previous php.general (#173943) next »