(prior to your changes) the geektools whois script found in the first post, queried whatever extension the individual put on the back of their searched domain, looped through all the available
whois registrars and returned the results.
it did this by looking for the . and proceeded on the basis of what followed eg co com etc
however since the introduced changes as below, if the domain extension is now attached to the query, eg unusualname.com it returns no match whereas if the extension is omitted it comes up as being available.
why would it do this?
<form method="POST" action= "<?PHP echo($PHP_SELF); ?>">
Find an available domain name from Network Solutions:
<P>
<INPUT name="domain" SIZE="20" MAXLENGTH="22">
<P>
<INPUT TYPE="SUBMIT" VALUE="Check name">
<INPUT TYPE="RESET" VALUE="Clear">
</P>
</FORM>
<hr>
<font size="2"><pre>
<?
function whois($domain, $server="www.geektools.com")
{
$fp = fsockopen ($server, 43, &$errnr, &$errstr) or die("$errno: $errstr");
fputs($fp, "$domain\n");
while (!feof($fp))
{
$linein=strtoupper(fgets($fp, 2048));
if ( strncmp($linein, "NO MATCH", 8) == 0 )
{
return(0);
}
}
fclose($fp);
return(1);
}
if ( isset($domain) )
{
if ( whois($domain) )
{
echo "The domain is already taken";
}
else
{
echo "<a href=\"process.php?domain=.$domain.\">the domain is free</a>";
}
}
?>
</pre></font>