2011-12-12 1 views
5

안녕하세요 저는 특정 도메인의 나이를 확인하는 좋은 방법이 있는지 궁금합니다.PHP를 사용하여 도메인 연령을 확인하는 방법

하지만 프로그래밍 방식으로 DNS에 도메인 나이를 온라인 도구가 아닌 PHP를 사용하여 확인하도록 요청하는 방법을 찾고 싶습니다.

Google에서 내 도메인 연령 및 기타 SEO 도구를 확인하는 방법을 알아 보려면 인터넷에서 검색하고 있습니다.

도메인 연령대를 묻는 특별한 권한이 있어야하는 도메인의 경우이 정보가 비공개입니까? 그리고 그렇다면? Google은 내 도메인 연령을 어떻게 알 수 있습니까? 아무도 내 도메인 연령을 물었다. 어떻게 그들이 그것을 알게 되었습니까?

+1

는 WHOIS 조회를 수행 작업을 찾을 수 있습니다! – jman

+1

이 기사 참조 http://99webtools.com/domain-age-checker-script.php – Sunny

답변

3

당신은 가장 최근에 RFC3912에 정의 WHOIS을 원하는 :

$ whois stackoverflow.com 

Whois Server Version 2.0 

Domain names in the .com and .net domains can now be registered 
with many different competing registrars. Go to http://www.internic.net 
for detailed information. 

    Domain Name: STACKOVERFLOW.COM 
    Registrar: GODADDY.COM, INC. 
    Whois Server: whois.godaddy.com 
    Referral URL: http://registrar.godaddy.com 
    Name Server: NS1.SERVERFAULT.COM 
    Name Server: NS2.SERVERFAULT.COM 
    Name Server: NS3.SERVERFAULT.COM 
    Status: clientDeleteProhibited 
    Status: clientRenewProhibited 
    Status: clientTransferProhibited 
    Status: clientUpdateProhibited 
    Updated Date: 30-nov-2010 
    Creation Date: 26-dec-2003 
    Expiration Date: 26-dec-2014 

    [...] 
4

Whois 서비스를 찾고 있습니다.

PHPWhois : WHISS 쿼리를위한 PHP 클래스는 정확한 WHOIS 서버에 도메인 이름, IP 주소 및 AS 핸들을 쿼리하고 구조화 된 배열의 데이터를 반환 할 수 있습니다.

1

등록 날짜는 대부분의 TLD에 대한 WHOIS를 통해 가능하며, DNS에 없습니다.

com/net 도메인의 경우 "whois.internic.net"에서 "Creation Date"를 확인할 수 있습니다. 대부분의 국가 TLD의 경우 "country-code.whois-servers.net"이라는 DNS 쿼리를 수행하여 WHOIS 서버를 찾을 수 있습니다. 대부분의 BSD 및 Linux 변형에서 명령 줄 WHOIS 클라이언트는 적절한 WHOIS 서버를 자동으로 찾습니다.

각 등록 기관은이 정보를 제공하기위한 자체 형식을 가지고 있으며 대부분은 동일한 IP 주소에서 빈번한 요청을 제한하기 위해 WHOIS 서버에서 제어를 구현했습니다.

PHPWhois을 살펴보십시오.

+0

whois 명령을 수행 할 때 누가 묻고 있습니까? DNS? 또는 다른 서비스? – themis

+0

WHOIS 서버를 요청하고 있습니다. WHOIS는 HTTP가 tcp 포트 80에서 실행되고 DNS는 UDP 포트 53에서 실행되는 것처럼 TCP 포트 43에서 실행되는 자체 프로토콜입니다. 명령 줄의 WHOIS 프로그램은 Firefox가 HTTP 클라이언트 인 것처럼 해당 프로토콜의 클라이언트입니다. 클라이언트는 서버에 연결하고 요청을 발행 한 다음 결과를 해석하거나 표시합니다. – ghoti

+0

대부분의 whois 클라이언트가 이미 알고있는 특정 최상위 도메인에 대해 적절한 whois 서버를 찾을 수있는 위치에 대한 규칙이 있습니다. 자세한 정보는 [whois man page] (http://www.freebsd.org/cgi/man.cgi?query=whois)를보십시오. 또한 우수한 웹 기반 whois 옵션을 보려면 [Uwhois.com] (http://www.uwhois.com/cgi/domains.cgi?)을 확인하십시오.사용자 = NoAds). – ghoti

2

당신은 PHP 스크립트 또는 웹 서비스를 찾고 있습니까?

웹 서비스의 경우 bulk domain age checker 도구를 확인하면 도메인 등록 날짜와 만료 날짜 및 등록 기관 이름을 확인할 수 있습니다. 한 번에 500 개의 도메인을 대량으로 확인할 수 있습니다.

희망이 도움이 도메인의 나이를 확인하는

1

사용이 PHP 스크립트와 여기에 당신은 domain age checker

class DomainAge{ 

    private $WHOIS_SERVERS=array(

    "com"=>array("whois.verisign-grs.com","/Creation Date:(.*)/"), 

    "net"=>array("whois.verisign-grs.com","/Creation Date:(.*)/"), 

    "org"=>array("whois.pir.org","/Created On:(.*)/"), 

    "info"=>array("whois.afilias.info","/Created On:(.*)/"), 

    "biz"=>array("whois.neulevel.biz","/Domain Registration Date:(.*)/"), 

    "us"=>array("whois.nic.us","/Domain Registration Date:(.*)/"), 

    "uk"=>array("whois.nic.uk","/Registered on:(.*)/"), 

    "ca"=>array("whois.cira.ca","/Creation date:(.*)/"), 

    "tel"=>array("whois.nic.tel","/Domain Registration Date:(.*)/"), 

    "ie"=>array("whois.iedr.ie","/registration:(.*)/"), 

    "it"=>array("whois.nic.it","/Created:(.*)/"), 

    "cc"=>array("whois.nic.cc","/Creation Date:(.*)/"), 

    "ws"=>array("whois.nic.ws","/Domain Created:(.*)/"), 

    "sc"=>array("whois2.afilias-grs.net","/Created On:(.*)/"), 

    "mobi"=>array("whois.dotmobiregistry.net","/Created On:(.*)/"), 

    "pro"=>array("whois.registrypro.pro","/Created On:(.*)/"), 

    "edu"=>array("whois.educause.net","/Domain record activated:(.*)/"), 

    "tv"=>array("whois.nic.tv","/Creation Date:(.*)/"), 

    "travel"=>array("whois.nic.travel","/Domain Registration Date:(.*)/"), 

    "in"=>array("whois.inregistry.net","/Created On:(.*)/"), 

    "me"=>array("whois.nic.me","/Domain Create Date:(.*)/"), 

    "cn"=>array("whois.cnnic.cn","/Registration Date:(.*)/"), 

    "asia"=>array("whois.nic.asia","/Domain Create Date:(.*)/"), 

    "ro"=>array("whois.rotld.ro","/Registered On:(.*)/"), 

    "aero"=> array("whois.aero","/Created On:(.*)/"), 

    "nu"=> array("whois.nic.nu","/created:(.*)/") 
); 

    public function age($domain) 
    { 

    $domain = trim($domain); 

    if(substr(strtolower($domain), 0, 7) == "http://") 

    $domain = substr($domain, 7); // remove http:// if included 

    if(substr(strtolower($domain), 0, 4) == "www.") 

    $domain = substr($domain, 4);//remove www from domain 

    if(preg_match("/^([-a-z0-9]{2,100}).([a-z.]{2,8})$/i",$domain)) 
    { 

    $domain_parts = explode(".", $domain); 

    $tld = strtolower(array_pop($domain_parts)); 

    if(!$server=$this->WHOIS_SERVERS[$tld][0]) { 

    return false; 

    } 

    $res=$this->queryWhois($server,$domain); 

    if(preg_match($this->WHOIS_SERVERS[$tld][1],$res,$match)) 

    { 

    date_default_timezone_set('UTC'); 

    $time = time() - strtotime($match[1]); 

    $years = floor($time/31556926); 

    $days = floor(($time % 31556926)/86400); 

    if($years == "1") {$y= "1 year"; 

} 
    else 

{ 
$y = $years . " years"; 
} 
    if($days == "1") {$d = "1 day"; 
} 
    else 
{ 
$d = $days . " days"; 
} 
    return "$y, $d"; 

} 
    else 

    return false; 
} 
    else 

    return false; 

} 

    private function queryWhois($server,$domain) 

    { 

    $fp = @fsockopen($server, 43, $errno, $errstr, 20) or die("Socket Error " 
    . $errno . " - " . $errstr); 

if($server=="whois.verisign-grs.com") 

$domain="=".$domain; 

    fputs($fp, $domain . "rn"); 
    $out = ""; 

    while(!feof($fp)){ 

    $out .= fgets($fp); 

    } 
    fclose($fp); 

    return $out; 
    } 

} 
관련 문제