RaphZahn
5/17/2018 - 9:33 AM

[PHP] HTTP or HTTPS

if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
  // HTTPS
} else {
  // HTTP
}