Re: [PHP] most reliable way to test if using https

2006-01-13 Thread Curt Zirzow
On Sat, Jan 14, 2006 at 04:20:27AM +, Matt wrote: > James Benson wrote: > > >What is the most reliable way to test if a connection is already using > >the https protocol, is their a PHP constant or something builtin already? > > > > > > > >Thanks, > >James > > > Something like? > > if (isset

Re: [PHP] most reliable way to test if using https

2006-01-13 Thread Curt Zirzow
On Fri, Jan 13, 2006 at 04:12:08PM -0700, Ray Hauge wrote: > if( !preg_match("/HTTPS/", $_SERVER['SERVER_PROTOCOL']) ){ > > } > > That's what I have been using. Thats odd cause all my servers report this as SERVER_PROTOCOL via https: $_SERVER["SERVER_PROTOCOL"] == HTTP/1.1 Thats odd

Re: [PHP] most reliable way to test if using https

2006-01-13 Thread Matt
James Benson wrote: What is the most reliable way to test if a connection is already using the https protocol, is their a PHP constant or something builtin already? Thanks, James Something like? if (isset($_SERVER["HTTPS"]) && 'on' == $_SERVER["HTTPS"]) {// ssl } else { // non-ssl } -- P

Re: [PHP] most reliable way to test if using https

2006-01-13 Thread Ray Hauge
if( !preg_match("/HTTPS/", $_SERVER['SERVER_PROTOCOL']) ){ } That's what I have been using. HTH -- Ray Hauge Programmer/Systems Administrator American Student Loan Services http://www.americanstudentloan.com 1.800.575.1099 On Friday 13 January 2006 04:05 pm, James Benson wrote: >

[PHP] most reliable way to test if using https

2006-01-13 Thread James Benson
What is the most reliable way to test if a connection is already using the https protocol, is their a PHP constant or something builtin already? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php