Piwik\Plugins\SEO\Metric\DomainAge::getAgeWhoisCom PHP Method

getAgeWhoisCom() private method

Returns the domain age whois.com lists for the current url
private getAgeWhoisCom ( string $domain ) : integer
$domain string
return integer
    private function getAgeWhoisCom($domain)
    {
        $data = $this->getUrl('http://www.whois.com/whois/' . urlencode($domain));
        preg_match('#(?:Creation Date|Created On|created):\\s*([ \\ta-z0-9\\/\\-:\\.]+)#si', $data, $p);
        if (!empty($p[1])) {
            $value = strtotime(trim($p[1]));
            if ($value === false) {
                return 0;
            }
            return $value;
        }
        return 0;
    }