You are here

public static function Server::get_domain in Anti Spam by CleanTalk 8.4

Same name and namespace in other branches
  1. 9.1.x src/lib/Cleantalk/Common/Variables/Server.php \Cleantalk\Common\Variables\Server::get_domain()
1 call to Server::get_domain()
FirewallUpdater::writeDbExclusions in src/lib/Cleantalk/Common/Firewall/FirewallUpdater.php
Writing to the DB self IPs

File

src/lib/Cleantalk/Common/Variables/Server.php, line 69

Class

Server
Class Server Wrapper to safely get $_SERVER variables

Namespace

Cleantalk\Common\Variables

Code

public static function get_domain() {
  preg_match('@\\.(\\S+)/?$@', self::get('HTTP_HOST'), $matches);
  return isset($matches[1]) ? $matches[1] : false;
}