How To Detect If Url Is Secured Ssl With Php In Https
- Forums
- Tutorial And Guides
- How To Detect If Url Is Secured Ssl With Php In Https
This Page Contains information about How To Detect If Url Is Secured Ssl With Php In Https By wallpaperama in category Tutorial And Guides with 5 Replies. [1481], Last Updated: Sat May 18, 2024
wallpaperama
Fri Jan 02, 2009
5 Comments
13287 Visits
$_SERVER['HTTPS']
if you want to know if you are using a secured url using port 443 within your site, you can use $_SERVER['HTTPS'], if you are using it will display on
echo $_SERVER['HTTPS'];
this way you can check if your page is using https or http
hope that helps
here is an example of how you can use it
<?php
if($_SERVER['HTTPS']){
echo 'you are secured';
}else{
echo 'you are not secured';
}
?>
try it
code is
fastcgi_param HTTPS $ssl_protocol;
for some reason "param" was truncated... maybe my fault.