Monday, June 29, 2015

PHP : get Request protocol Http or HTTPS

  1. <?php
  2.  
  3. if ($_SERVER['HTTPS'] != "on") {
  4. echo "This is not HTTPS";
  5. }else{
  6. echo "This is HTTPS";
  7. }
  8.  
  9. <?
http://snipplr.com/view/62373/check-if-url-is-https-in-php/