你好,我想知道是否有一個很好的方法來找出特定域的年齡。如何使用php檢查域名年齡
但我想找出一種方法來以編程方式要求DNS使用php而不是從在線工具檢查域名年齡。
我在網上搜索瞭解谷歌如何檢查我的域名年齡和其他搜索引擎優化工具。
此信息對於您必須擁有特殊權限才能詢問域的年齡是什麼的域是私有的嗎?如果是的話?谷歌怎麼知道我的域名年齡?沒有人問我的域名年齡..他們怎麼知道它?
你好,我想知道是否有一個很好的方法來找出特定域的年齡。如何使用php檢查域名年齡
但我想找出一種方法來以編程方式要求DNS使用php而不是從在線工具檢查域名年齡。
我在網上搜索瞭解谷歌如何檢查我的域名年齡和其他搜索引擎優化工具。
此信息對於您必須擁有特殊權限才能詢問域的年齡是什麼的域是私有的嗎?如果是的話?谷歌怎麼知道我的域名年齡?沒有人問我的域名年齡..他們怎麼知道它?
$ 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
[...]
註冊時間是通過WHOIS可用於大多數的頂級域名,而不是DNS。
對於com/net域,您可以檢查whois.internic.net是否有「創建日期」。對於大多數國家TLD,您可以通過執行「國家/地區代碼 .whois-servers.net」的DNS查詢來查找WHOIS服務器。大多數BSD和Linux變體中的命令行WHOIS客戶端會自動查找正確的WHOIS服務器。
請注意,每個註冊商都有自己的格式來顯示此信息,並且大多數已在其WHOIS服務器上實施控制以限制來自同一IP地址的頻繁請求。
看一看PHPWhois。
當我做一個whois命令,我問誰? dns?或其他服務? – themis
你正在問一個WHOIS服務器。 WHOIS是它自己的協議,運行在TCP端口43上,就像HTTP在TCP端口80上運行一樣,DNS在udp端口53上運行。命令行中的WHOIS程序是該協議的客戶端,就像Firefox是HTTP客戶端一樣。您的客戶端與服務器建立連接,發出請求,然後解釋和/或顯示結果。 – ghoti
關於在哪裏可以找到適用於大多數whois客戶已經瞭解的特級頂級域名的相應whois服務器的一些規則。查看[whois手冊頁](http://www.freebsd.org/cgi/man.cgi?query=whois)瞭解更多信息。此外,對於一個出色的基於Web的whois選項,請查看[Uwhois.com](http://www.uwhois.com/cgi/domains.cgi?用戶= NoAds)。 – ghoti
你正在尋找一個PHP腳本或網絡服務?
如果一個web服務,然後檢查出這個bulk domain age checker工具,它讓你找出域名註冊日期和過期日期加上註冊商的名字。您可以一次批量檢查500個域名。
希望這有助於
使用此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;
}
}
使用whois查詢! – jman
看到這篇文章http://99webtools.com/domain-age-checker-script.php – Sunny