Check if HTTP or HTTPS is used
Posted: Tue Apr 25, 2006 4:27 am
This forum seems to have potential, so here comes the first post for me!
I need to check if a certain page loads via HTTP och HTTPS. I have not found a way to do this. Is there no way to get the complete request e.g. "http://www.yadayada.com/folder/index.php", and not just "/folder/index.php"? That way I could substr() the seven first caracters.
The $_SERVER['SERVER_PROTOCOL'] variable seems to be 'HTTP/1.1' even if HTTPS is used.
I need to check if a certain page loads via HTTP och HTTPS. I have not found a way to do this. Is there no way to get the complete request e.g. "http://www.yadayada.com/folder/index.php", and not just "/folder/index.php"? That way I could substr() the seven first caracters.
The $_SERVER['SERVER_PROTOCOL'] variable seems to be 'HTTP/1.1' even if HTTPS is used.