Definition:
function is_ssl() {}
Determine if SSL is used.
Return values
returns:True if SSL, false if not used.
Source code
function is_ssl() {
if ( isset($_SERVER['HTTPS']) ) {
if ( 'on' == strtolower($_SERVER['HTTPS']) )
return true;
if ( '1' == $_SERVER['HTTPS'] )
return true;
} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
return true;
}
return false;
}
2189

February 12, 2011 


No comments yet... Be the first to leave a reply!