hvorfor er alle dk domains optaget?
jeg ledte efter et domain tester script i php (eller asp) fandt dette, mne det checker ikke for dk, så jeg ville prøve selv ( at lave det lidt om ) nu checker den, men alle dk domains er optaget.nogle gode ide'er
<?php
/*
MRWhois - a Whois lookup script written in PHP.
Copyright (C) 2001 Marek Rozanski
marek@yagooroo.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Define lookup variables
// .dk
$dkserver = "whois.ripe.net"; // server to lookup for domain name
$dknomatch = "No match"; // string returned by server if the domain is not found
// .com .net .org domains
$comserver = "whois.networksolutions.com"; // server to lookup for domain name
$comnomatch = "No match"; // string returned by server if the domain is not found
// Define some look parameters
$pagetitle = "MRWhois v. 1.2"; // page title used in meta section
$poweredby = "Powered by <a href=http://www.mrscripts.co.uk target=_blank><font face=verdana size=-2 color=black><b>MRWhois</b></font></a>";
$backgcol = "#FFFFFF"; // general background color
$fontface = "verdana";
$fontsize = "2";
$fontacolor = "green"; // color of an available domain
$fontucolor = "red"; // color when not available
$infolinks = "black"; // color of additional links
$sepcolor = "#cccccc"; // separator color
$stdcolor = "black"; // header and footer font color
$footersize = "1"; // size of the footer info font
$errcolor = "red"; // color of error messages
// Shall we use register link? (yes/no)
$reglink = "yes";
// If yes, give the url, it can be your affiliate link
$regurl = "http://www.micropage.dk/order.asp";
// Do you want a log file? (yes/no)
$wantlog = "yes";
// If yes, give the log file name here
// remember to chmod the file to 777 (change permition to writable for everyone)
$logfile = "mrwhois.log";
// End of variables, you do not need to change anythin below this line.
// This function displays an available domain
function dispav($what)
{
global $fontface, $fontsize, $fontacolor, $infolinks, $reglink, $regurl;
echo "<tr>
<td nowrap align=center>";
if ($reglink=="yes")
{
echo "<a href=$regurl target=_blank onMouseOver=\"window.status='Register $what';return true\" onMouseOut=\"window.status='';return true\"><font face=$fontface size=$fontsize color=$infolinks>Register</font></a>";
}
else
{
echo " ";
}
echo "</td>
<td nowrap align=center><font face=$fontface size=$fontsize color=$fontacolor><b>$what</b></font></td>
<td colspan=3> </td>
</tr>";
}
// Function to display an unavailable domain with additional links
function dispun($what,$where)
{
global $fontface, $fontsize, $fontucolor, $infolinks;
echo "<tr><td colspan=2> </td>
<td align=center nowrap><font face=$fontface size=$fontsize color=$fontucolor><b>$what</b></font></td>
<td nowrap align=center><a href='#' onMouseOver=\"window.status='Details about $what';return true\" onMouseOut=\"window.status='';return true\" onClick=java script:window.open('mrwhois.php?action=details&domain=$what&server=$where','details','scrollbars=1,copyhistory=0,directories=0,status=0,resizable=yes,width=500,height=400')><font face=$fontface size=$fontsize color=$infolinks>Details</font></a></td>
<td nowrap align=center><a href=http://www.$what target=_blank><font face=$fontface size=$fontsize color=$infolinks>Goto</font></a></td>
</tr>";
}
function startborder()
{
echo "<table align=center width=600 border=0 cellspacing=0 cellpadding=0>
<tr><td width=100% bgcolor=#000000>
<table width=600 border=0 cellspacing=1 cellpadding=2>
<tr bgcolor=#ffffff><td>";
}
function endborder()
{
echo "</td></tr></table></td></tr></table>";
}
function disperror($text)
{
global $fontface, $fontsize, $errcolor;
startborder();
echo "<center><font face=$fontface size=$fontsize color=$errcolor><b>$text</b></font></center>";
endborder();
}
function main()
{
global $sepcolor, $fontface, $fontsize, $stdcolor, $type, $domain, $footersize, $poweredby;
echo "<br>";
startborder();
echo "
<table width=100% align=center cellspacing=0 cellpadding=1>
<tr>
<td colspan=2 align=center width=100%>
<font face=$fontface size=$fontsize color=$stdcolor><b>Please enter a suggested domain name</b></font>
</td>
</tr>
<tr>
<td align=center>
<form method=post action=D_tester.php>
<input type=hidden name=action value=checkdom>
<input type=hidden name=type value=$type>
<input type=text name=domain size=30 value=$domain> <input type=submit name=button value=Check>
</td>
<td align=left>
<font face=$fontface size=$fontsize color=$stdcolor>
<INPUT TYPE=radio "; if($type=="all" or $type == "") { echo "CHECKED "; } echo "NAME=type VALUE=all><font face=$fontface size=$fontsize color=$stdcolor> all<br>
<INPUT TYPE=radio "; if($type=="dk") { echo "CHECKED "; } echo " NAME=type VALUE=dk><font face=$fontface size=$fontsize color=$stdcolor> dk<br>
<INPUT TYPE=radio "; if($type=="com") { echo "CHECKED "; } echo " NAME=type VALUE=com><font face=$fontface size=$fontsize color=$stdcolor> com net org<br>
</form>
</td>
</tr>
<tr><td colspan=2 align=center>
<font face=$fontface size=$footersize color=$stdcolor>$poweredby</font>
</td></tr>
</table>";
endborder();
}
function pageheader($body)
{
global $pagetitle;
echo "
<HTML>
<head>
<title>$pagetitle</title>
</head>
<BODY bgcolor=$body>
";
}
function pagefooter()
{
echo "</BODY></HTML>";
}
if ($action == "details")
{
pageheader("white");
echo "<pre>";
$fp = fsockopen($server,43);
fputs($fp, "$domain\r\n");
while(!feof($fp))
{
echo fgets($fp,128);
}
fclose($fp);
echo "</pre>";
echo "<p align=center><a href=java script:window.close()><font face=$fontface size=$fontsize color=$stdcolor><b>CLOSE</b></font></a>";
pagefooter();
exit;
}
elseif ($action == "checkdom")
{
// Check the name for bad characters
if(strlen($domain) < 3)
{
$msg = "The domain name you typed is to short - it must contain minimum 3 characters";
pageheader($backgcol);
disperror($msg);
main();
pagefooter();
exit;
}
if(strlen($domain) > 63)
{
$msg = "The domain name you typed is to long - it may contain maximum 63 characters";
pageheader($backgcol);
disperror($msg);
main();
pagefooter();
exit;
}
if(ereg("^-|-$",$domain))
{
$msg = "Domain names cannot begin or end with a hyphen or contain double hyphens";
pageheader($backgcol);
disperror($msg);
main();
pagefooter();
exit;
}
if(!ereg("([a-z]|[A-Z]|[0-9]|-){".strlen($domain)."}",$domain))
{
$msg = "Domain names can only contain alphanumerical characters and hyphens";
pageheader($backgcol);
disperror($msg);
main();
pagefooter();
exit;
}
pageheader($backgcol);
startborder();
echo "
<table width=100% align=center cellspacing=0 cellpadding=1>
<tr>
<td nowrap align=center bgcolor=$sepcolor>
<font face=$fontface size=$fontsize color=$stdcolor><b> </b></font>
</td>
<td nowrap align=center bgcolor=$sepcolor>
<font face=$fontface size=$fontsize color=$stdcolor><b>Available</b></font>
</td>
<td nowrap align=center bgcolor=$sepcolor>
<font face=$fontface size=$fontsize color=$stdcolor><b>Taken</b></font>
</td>
<td nowrap align=center bgcolor=$sepcolor>
<font face=$fontface size=$fontsize color=$stdcolor><b> </b></font>
</td>
<td nowrap align=center bgcolor=$sepcolor>
<font face=$fontface size=$fontsize color=$stdcolor><b> </b></font>
</td>
</tr>\n";
if($type == "all" or $type == "com")
{
$comarray = array($domain.".com",$domain.".net",$domain.".org");
$comcount = count($comarray);
$i=0;
for ($i=0;$i<$comcount;$i++) {
$domname = $comarray[$i];
$query = $domname."@".$comserver;
$result = "";
$ns = fsockopen($comserver,43); fputs($ns,"$domname\r\n");
while(!feof($ns)) $result .= fgets($ns,128); fclose($ns);
if (eregi($comnomatch,$result)) { dispav($domname); } else { dispun($domname,$comserver); }
}
echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>";
}
if($type == "all" or $type == "dk")
{
$dkarray = array($domain.".dk");
$dkcount = count($dkarray);
$i=0;
for ($i=0;$i<$dkcount;$i++) {
$domname = $dkarray[$i];
$query = $domname."@".$dkserver;
$result = "";
$ns = fsockopen($dkserver,43); fputs($ns,"$domname\r\n");
while(!feof($ns)) $result .= fgets($ns,128); fclose($ns);
if (eregi($dknomatch,$result)) { dispav($domname); } else { dispun($domname,$dkserver); }
}
echo "<tr><td colspan=5 bgcolor=$sepcolor><font face=$fontface size=$fontsize> </td></tr>";
}
echo "</table>";
endborder();
if($wantlog=="yes")
{
$remote_addr = $REMOTE_ADDR;
$today = date("d-m-y H:i", time());
if (file_exists($logfile))
{
$fp = fopen($logfile,"a+");
$infolog = "Date: $today | IP: $remote_addr | $domain\n";
fputs($fp, $infolog);
fclose($fp);
}
}
main();
pagefooter();
}
else
{
pageheader($backgcol);
main();
pagefooter();
}
?>
her kan man teste scriptet
http://www.micropage.dk/D_tester.php
