![]() |
| Home | Apache | PHP | Ubuntu | MySQL | Linux | HTML | Win | CSS | Perl | Javascript | Rants | Retro |
|
||
| How to detect if the webpage is secure in PHP. https pages in php To detect if the webpage is secure in PHP use the following code below. This is handy as you can automatically change the URLs in your menu, to point to https:// if the page is secured. This will allow to display the secure padlock in the users browser. <?php if($_SERVER['HTTPS']){ echo 'https://www.techheadz.co.uk'; }else{ echo 'http://www.techheadz.co.uk'; } ?> |