PHP : get Request protocol Http or HTTPS
Posted by Jeevan on 18 September, 2009
No comments yet
This item was filled under [ PHP ]
How to get Requested protocol Http or HTTPS in PHP?
This function will return True if HTTPS when called…
is_https()
{
return strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))==’https’? true : false;
}
is_https()
{
return strtolower(substr($_SERVER["SERVER_PROTOCOL"],0,5))=='https'? true : false;
}