I need to check if a page works using SSL connection. I know how to check $_SERVER['HTTPS'] == 'on'. Is this a good way of doing it, or should I use other logic?
Sorry for my english. Thanks.
I need to check if a page works using SSL connection. I know how
Share
$_SERVER['HTTPS']may contain values other than'on'or it may not be set at all. The manual says it’ll be set to a “non empty” value if SSL is used, but on IIS it may be set to'off'. So, use: