|
|
Joined: Dec 1999
Posts: 30,867
Master Elite Member
|
Get the Current Request ProtocolThis is the defacto standard way to return the protocol of the current request.
function Request_Protocol() {
return (
( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ) ||
( isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' )
) ? 'https' : 'http';
}
Last edited by Russ; 06/23/16 06:46 PM.
|
|
|
|
|