Example #1
0
 public static function getDomain()
 {
     $noprefix = str_replace(Configuration::getDomainPrefixes(), '', $_SERVER['HTTP_HOST']);
     $name = str_replace(Configuration::getDomainSuffixes(), '', $noprefix);
     $domain = parse_url($name);
     if (!empty($domain["host"])) {
         return strtolower($domain["host"]);
     } else {
         return strtolower($domain["path"]);
     }
 }