+
+ /**
+ * Are we running from the web with HTTPS?
+ *
+ * @return boolean true if we're running with HTTPS; else false
+ */
+
+ static function isHTTPS()
+ {
+ // There are some exceptions to this; add them here!
+ if(empty($_SERVER['HTTPS'])) {
+ return false;
+ } else {
+ return $_SERVER['HTTPS'] !== 'off';
+ }
+ }