Support » Plugins » [Plugin: HTTPS for WordPress] Incomplete checking of https

Viewing 1 replies (of 1 total)
  • how about this:

    function isSSL()
    {
       if(!empty($_SERVER['HTTPS']){ return true; }
       else{ return false; }
    }

    I suppose if you really wanted to you could check the server port.

    function isSSL()
    {
       if(!empty($_SERVER['HTTPS'])||$_SERVER['SERVER_PORT']==443)
       { return true; }
       else{ return false; }
    }

    I always check if $_SERVER[‘HTTPS’] is not empty. The PHP Documentation says that $_SERVER[‘HTTPS’] is, “Set to a non-empty value if the script was queried through the HTTPS protocol.”

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: HTTPS for WordPress] Incomplete checking of https’ is closed to new replies.