File "SecondLevelDomainNames.php"

Full Path: /home/warrior1/public_html/wp-content-20241001222009/plugins/mailpoet/lib/Util/SecondLevelDomainNames.php
File size: 262 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace MailPoet\Util;

if (!defined('ABSPATH')) exit;


class SecondLevelDomainNames {
  public function get($host) {
    if (preg_match('/[^.]*\.[^.]{2,3}(?:\.[^.]{2,3})?$/', $host, $matches)) {
      return $matches[0];
    }
    return $host;
  }
}