Good Day to you all.
I have read many pages and posts about HTTPS but I can not see an answer to my question that is bugging me as I write some code.
Domain name is www.mydomain.com and setup for normal operation on (HTTP - Port 80)
Example Code: code.php
if(isset($_SERVER['HTTPS'])) {
echo "HTTPS is available<br>";
} else {
echo "HTTPS is NOT available<br>";
}
Now when I run http://www.mydomain.com/code.php I get "HTTPS is NOT available" but if I run as https://www.mydomain.com/code.php I get "HTTPS is available"
So how can you check in php if the domain has an SSL cert and is capable of running on HTTPS - Port 443 when you are running the code just under HTTP - Port 80.