Hallo,
bei meinem Whoisscript gehen einige Domains nicht:
<?
require("config.php"); ?>
<table border="0" width="100%" height="392" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="392" valign="top" rowspan="2"><font face="Verdana" size="1"><b>Bestellvorgang - Domains</b></font><p><font size="1" face="Verdana">Bitte wählen Sie
eine Domain:</font></p>
<p><form name="form1" method="post" action="index.php">
<b><font size="2" face="Verdana">www.</b> <input type="text" name="dom">
<select name="endung">
<option value=".de">.de</option>
<option value=".com">.com</option>
<option value=".net">.net</option>
<option value=".org">.org</option>
<option value=".info">.info</option>
<option value=".biz">.biz</option>
<option value=".ch">.ch</option>
<option value=".at">.at</option>
<option value=".name">.name</option>
<option value=".li">.li</option>
<option value=".be">.be</option>
<option value=".md">.md</option>
<option value=".pl">.pl</option>
<option value=".co.uk">.co.uk</option>
<option value=".cn">.cn</option>
<option value=".la">.la</option>
<option value=".sg">.sg</option>
<option value=".jp">.jp</option>
<option value=".bz">.bz</option>
<option value=".cc">.cc</option>
<option value=".fm">.fm</option>
<option value=".gs">.gs</option>
<option value=".nu">.nu</option>
<option value=".sh">.sh</option>
<option value=".tc">.tc</option>
<option value=".tk">.tk</option>
<option value=".tv">.tv</option>
<option value=".vg">.vg</option>
</select>
<input type="hidden" name="domain" value="<? echo $dom.$endung; ?>">
<input type="submit" name="Submit" value="prüfen">
</form>
<?
if ($dom) {
$dom = $dom.$endung;
$whoisresult = lookup($dom);
print "<pre></pre>";
}
function get_whois_server($domain){
$whoisservers=array(array("de","whois.denic.de"),
array("com","rs.internic.net")
,array("net","rs.internic.net")
,array("org","whois.networksolutions.com")
,array("info","whois.afilias.net")
,array("biz","whois.biz")
,array("at","whois.nic.at")
,array("ch","whois.nic.ch")
,array("name","whois.nic.name")
,array("us","whois.nic.us")
,array("md","whois.iana.org")
,array("li","whois.nic.ch")
,array(".be","whois.dns.be")
,array(".bz","mhpwhois1.verisign-grs.net")
,array(".fm","whois.nic.br ")
,array(".ac","whois.nic.ac")
,array(".gs","whois.cnnic.net.cn")
,array(".jp","whois.nic.ad.jp")
,array(".la","whois.adamsnames.tc")
,array(".nu","whois.nic.nu")
,array(".pl","whois.dns.pl")
,array(".sh","whois.nic.sh")
,array(".co.uk","whois.nic.uk")
,array(".tk","whois.dot.tk")
,array(".sg","whois.nic.net.sg")
,array(".tc","whois.adamsnames.tc")
,array(".nu","whois.nic.nu")
,array(".vg","whois.adamsnames.tc")
,array(".fm","whois.dot.fm")
,array(".cn","whois.cnnic.net.cn")
,array(".cc","whois.nic.cc")
,array(".tv","http://www.tv/en-def-1dddb1d3105a/en/index.shtml")
,array(".gs","whois.adamsnames.tc"));
$whocnt = count($whoisservers);
for ($x=0;$x<$whocnt;$x++){
$artld = $whoisservers[$x][0];
$tldlen = intval(0 - strlen($artld));
if (substr($domain, $tldlen) == $artld) $whosrv = $whoisservers[$x][1];
}
return $whosrv;
}
function lookup($dom){
$lusrv = get_whois_server($dom);
if (!$lusrv) return "";
$fp = fsockopen($lusrv,43);
if($lusrv == "whois.denic.de") fputs($fp, "-C ISO-8859-1 -T ace,dn $dom\r\n");
else fputs($fp, "$dom\r\n");
$string="";
while(!feof($fp)){
$string.= fgets($fp,128);
}
fclose($fp);
$reg = "/Whois Server: (.*?)\n/i";
preg_match_all($reg, $string, $matches);
$secondtry = $matches[1][0];
if ($secondtry){
$fp = fsockopen($secondtry,43);
fputs($fp, "$dom\r\n");
$string="";
while(!feof($fp)){
$string.=fgets($fp,128);
}
fclose($fp);
}
if(ereg("(No match|No entries found|NOT FOUND|Not found|not found in database|We do not have an entry in our database matching your query)",$string)) {
echo "<b><font size=\"2\" face=\"Verdana\">Der Domainname ".$dom." ist frei <form method=\"POST\" action=\"index_2.php\">
<input type=\"hidden\" name=\"domain\" value=\"".$dom.$endung."\"><input type=\"submit\" name=\"ab\" value=\"bestellen\">
</form>";
}
else {
echo "<b><font size=\"2\" face=\"Verdana\">Der Domainname ".$dom." ist vergeben. <form method=\"POST\" action=\"index_2.php\">
<input type=\"hidden\" name=\"domain\" value=\"".$dom.$endung."\"><input type=\"submit\" name=\"ab\" value=\"per KK Antrag übernehmen\">
</form>";
$whois = "<font size=\"12pt\">".$string."</font>";
return ;
}
}
?>
Domains, die nicht gehen:
at
be
md
pl
cn
la
sg
jp
gs
fm
nu
tc
tk
tv
vg
...es wird einfach angezeigt, dass die Domains besetzt sind, obwohl sie frei sind. Könnte mir jemand helfen, damit es funktioniert?
bei meinem Whoisscript gehen einige Domains nicht:
<?
require("config.php"); ?>
<table border="0" width="100%" height="392" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="392" valign="top" rowspan="2"><font face="Verdana" size="1"><b>Bestellvorgang - Domains</b></font><p><font size="1" face="Verdana">Bitte wählen Sie
eine Domain:</font></p>
<p><form name="form1" method="post" action="index.php">
<b><font size="2" face="Verdana">www.</b> <input type="text" name="dom">
<select name="endung">
<option value=".de">.de</option>
<option value=".com">.com</option>
<option value=".net">.net</option>
<option value=".org">.org</option>
<option value=".info">.info</option>
<option value=".biz">.biz</option>
<option value=".ch">.ch</option>
<option value=".at">.at</option>
<option value=".name">.name</option>
<option value=".li">.li</option>
<option value=".be">.be</option>
<option value=".md">.md</option>
<option value=".pl">.pl</option>
<option value=".co.uk">.co.uk</option>
<option value=".cn">.cn</option>
<option value=".la">.la</option>
<option value=".sg">.sg</option>
<option value=".jp">.jp</option>
<option value=".bz">.bz</option>
<option value=".cc">.cc</option>
<option value=".fm">.fm</option>
<option value=".gs">.gs</option>
<option value=".nu">.nu</option>
<option value=".sh">.sh</option>
<option value=".tc">.tc</option>
<option value=".tk">.tk</option>
<option value=".tv">.tv</option>
<option value=".vg">.vg</option>
</select>
<input type="hidden" name="domain" value="<? echo $dom.$endung; ?>">
<input type="submit" name="Submit" value="prüfen">
</form>
<?
if ($dom) {
$dom = $dom.$endung;
$whoisresult = lookup($dom);
print "<pre></pre>";
}
function get_whois_server($domain){
$whoisservers=array(array("de","whois.denic.de"),
array("com","rs.internic.net")
,array("net","rs.internic.net")
,array("org","whois.networksolutions.com")
,array("info","whois.afilias.net")
,array("biz","whois.biz")
,array("at","whois.nic.at")
,array("ch","whois.nic.ch")
,array("name","whois.nic.name")
,array("us","whois.nic.us")
,array("md","whois.iana.org")
,array("li","whois.nic.ch")
,array(".be","whois.dns.be")
,array(".bz","mhpwhois1.verisign-grs.net")
,array(".fm","whois.nic.br ")
,array(".ac","whois.nic.ac")
,array(".gs","whois.cnnic.net.cn")
,array(".jp","whois.nic.ad.jp")
,array(".la","whois.adamsnames.tc")
,array(".nu","whois.nic.nu")
,array(".pl","whois.dns.pl")
,array(".sh","whois.nic.sh")
,array(".co.uk","whois.nic.uk")
,array(".tk","whois.dot.tk")
,array(".sg","whois.nic.net.sg")
,array(".tc","whois.adamsnames.tc")
,array(".nu","whois.nic.nu")
,array(".vg","whois.adamsnames.tc")
,array(".fm","whois.dot.fm")
,array(".cn","whois.cnnic.net.cn")
,array(".cc","whois.nic.cc")
,array(".tv","http://www.tv/en-def-1dddb1d3105a/en/index.shtml")
,array(".gs","whois.adamsnames.tc"));
$whocnt = count($whoisservers);
for ($x=0;$x<$whocnt;$x++){
$artld = $whoisservers[$x][0];
$tldlen = intval(0 - strlen($artld));
if (substr($domain, $tldlen) == $artld) $whosrv = $whoisservers[$x][1];
}
return $whosrv;
}
function lookup($dom){
$lusrv = get_whois_server($dom);
if (!$lusrv) return "";
$fp = fsockopen($lusrv,43);
if($lusrv == "whois.denic.de") fputs($fp, "-C ISO-8859-1 -T ace,dn $dom\r\n");
else fputs($fp, "$dom\r\n");
$string="";
while(!feof($fp)){
$string.= fgets($fp,128);
}
fclose($fp);
$reg = "/Whois Server: (.*?)\n/i";
preg_match_all($reg, $string, $matches);
$secondtry = $matches[1][0];
if ($secondtry){
$fp = fsockopen($secondtry,43);
fputs($fp, "$dom\r\n");
$string="";
while(!feof($fp)){
$string.=fgets($fp,128);
}
fclose($fp);
}
if(ereg("(No match|No entries found|NOT FOUND|Not found|not found in database|We do not have an entry in our database matching your query)",$string)) {
echo "<b><font size=\"2\" face=\"Verdana\">Der Domainname ".$dom." ist frei <form method=\"POST\" action=\"index_2.php\">
<input type=\"hidden\" name=\"domain\" value=\"".$dom.$endung."\"><input type=\"submit\" name=\"ab\" value=\"bestellen\">
</form>";
}
else {
echo "<b><font size=\"2\" face=\"Verdana\">Der Domainname ".$dom." ist vergeben. <form method=\"POST\" action=\"index_2.php\">
<input type=\"hidden\" name=\"domain\" value=\"".$dom.$endung."\"><input type=\"submit\" name=\"ab\" value=\"per KK Antrag übernehmen\">
</form>";
$whois = "<font size=\"12pt\">".$string."</font>";
return ;
}
}
?>
Domains, die nicht gehen:
at
be
md
pl
cn
la
sg
jp
gs
fm
nu
tc
tk
tv
vg
...es wird einfach angezeigt, dass die Domains besetzt sind, obwohl sie frei sind. Könnte mir jemand helfen, damit es funktioniert?
Kommentar