Welcome Guest, Not a member yet? Register   Sign In
Need is_https()
#1

HiĀ 
Can you please add isHttps as your system common function.
Code:
if ( ! function_exists('isHttps'))
{
    /**
     * Is HTTPS?
     *
     * Determines if the application is accessed via an encrypted
     * (HTTPS) connection.
     *
     * @return    bool
     */
    function isHttps()
    {
        if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')
        {
            return TRUE;
        }
        elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https')
        {
            return TRUE;
        }
        elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off')
        {
            return TRUE;
        }

        return FALSE;
    }
}
Reply


Messages In This Thread
Need is_https() - by murad_ali - 09-03-2020, 08:43 AM
RE: Need is_https() - by MGatner - 09-10-2020, 05:52 AM
RE: Need is_https() - by murad_ali - 09-10-2020, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB