Check if URL is HTTPS in PHP


/ Published in: PHP
Save to your folder(s)

Check if URL is HTTPS


Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. if ($_SERVER['HTTPS'] != "on") {
  4. echo "This is not HTTPS";
  5. }else{
  6. echo "This is HTTPS";
  7. }
  8.  
  9. <?

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.