missing tags or quotes
Posted: Mon Jul 05, 2010 10:27 am
my code was working perfectly earlier now i ve changed the table a bit and for some reason it wont work i cant figure out whats wromg
Code: Select all
<html><h1 style="text-align:center;">Whois lookup Results</h1></center>
<br>
<body>
<center>
<?php
$domain_string = $_POST["Domainname"];
$domain_array = explode("\n", $domain_string);
foreach ($domain_array as $domain) {
$domain = trim($domain);
if ($domain != "") {
$result = shell_exec('whois ' . $domain);
$srcharray = array(
"no match",
"not found",
"no found",
"nothing found",
"no domain",
"no data found",
"no data was found",
"no entries found",
"status: free",
"status: available",
"is free",
"does not exist",
"no information",
"we do not have",
"not registered",
"nomatch",
"no such domain",
"no live registration",
"not in whois database",
"not yet been delegated",
"not yet been registered",
"not delegated",
"no records matching",
"no records found",
"- available",
"220 available",
"no existe",
"domain status: avail",
"dominio no registrado",
"has not yet been registered",
"has not yet been delegated",
"nije registrirana",
"domain name not known",
"not in the uanic",
"not a domain controlled by",
"object_not_found",
);
$term_list = implode("|", $srcharray);
echo'
<center>
<table border="2" >
<tr>
<td width="800" height="100">
<center>;
if (preg_match("/$term_list/i" , $result)) {
echo '<h2 style="color:green;"><blink>AVAILABLE!</blink></h2>';
} else
{
echo '<h2 style="color:red;"><blink>UNAVAILABLE!</blink></h2>';
}
</center>
</td>
</tr>
<tr>
<td width="800" height="100">
<center><h3>Whois '.$domain.'</h3></center>
</td>
</tr>
<tr>
<td width="800" height="600">
<center>
str_replace("\n", "<br>", $result) .
</center>
</td>
</tr>
</table>
</center>;
'
}
}
?>
</body>
</html>