U suštini jeste... njihovi serveri brzo to rade prema tome ja se o njih "grebem", ostavim im godišnje 1000$ valjda imam pravo
... evo i za Internic mada je presporo i nekada i više od 10s...
PHP kôd:
class Internic{
private $exts = array("aero","arpa","asia","biz","cat","com","coop","edu","info","int","jobs","mobi","museum","name","net","org","pro","travel");
public function check($url){
$ext = explode(".", $url);
$ext = end($ext);
if(in_array($ext, $this->exts)){
$data = $this->curl("http://reports.internic.net/cgi/whois?whois_nic=$url&type=domain");
$return = $this->match("<pre>(.*?)</pre>", $data);
}else{
$return = false;
}
return $return;
}
private function match($regex, $string){
preg_match("#$regex#is", $string, $matches);
return $matches[1];
}
private function curl($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
}
$whois = new Internic;
echo $whois->check("devprotalk.com");