Sitenizden Domain Sorgulatmak!
Arkadaslar bir hosting sitesimi yapıyorsunuz ?
Ozaman tabikide Domain sorgulama koduna ihtiyacınız olacaktır..
Buyrun İndirin..
http://www.denwer.com/denwhois.rar
lik çalısmıyır bulunca düzeltecem çünki banada lazım...
Sitenizden Domain Sorgulatmak!
- PeeRLeeSS
- Megabyte1

- Mesajlar: 848
- Kayıt: 15 Mar 2006, 18:12
- İletişim:
- PeeRLeeSS
- Megabyte1

- Mesajlar: 848
- Kayıt: 15 Mar 2006, 18:12
- İletişim:
Kod: Tümünü seç
<?
Class WhoisUtils
{
var $timeout = 30;
var $result = "";
var $host = "";
var $MainTlds = array ("com","org","net");
function GetWhoisServer ($tld)
{
$whois_servers = array(
"cc" => "whois.nic.cc",
"com" => "whois.crsnic.net",
"org" => "whois.crsnic.net",
"net" => "whois.crsnic.net",
"info" => "whois.afilias.net",
"com.tr" => "whois.metu.edu.tr",
"net.tr" => "whois.metu.edu.tr",
"org.tr" => "whois.metu.edu.tr",
"gen.tr" => "whois.metu.edu.tr");
return $whois_servers[$tld];
}
function lookup($domain,$whois_server)
{
$this->domain = $domain;
$this->server = $whois_server;
$this->host = gethostbyname ($whois_server);
$whoisSocket = fsockopen($this->host,43, $errno, $errstr, $this->timeout);
if ($whoisSocket)
{
fputs($whoisSocket, $domain."\015\012");
while (!feof($whoisSocket))
{
$this->result .= fgets($whoisSocket,128) . "<br>";
}
fclose($whoisSocket);
}
}
function GetResult()
{
return $this->result;
}
function IsAvailMainTld($domain, $result_text = "")
{
if (empty($result_text)) $result_text = $this->result;
if (preg_match("/$domain\n/i",$result_text)) { return false;} else {return true;}
}
}
?> 