Here is an example you might want to play with, it uses javascript/ajax:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled</title>
<style type="text/css">
table,td
{
border: 2px solid black;
}
</style>
</head>
<body>
<table>
<tr>
<td id="dmnm1">domain.com</td>
<td id="dmnm1avail">Looking up availability...</td>
</tr>
<tr>
<td id="dmnm2">domain2.com</td>
<td id="dmnm2avail">Looking up availability...</td>
</tr>
<tr>
<td id="dmnm3">domain3.com</td>
<td id="dmnm3avail">Looking up availability...</td>
</tr>
<tr>
<td id="dmnm4">domain4.com</td>
<td id="dmnm4avail">Looking up availability...</td>
</tr>
<tr>
<td id="dmnm5">domain5.com</td>
<td id="dmnm5avail">Looking up availability...</td>
</tr>
</table>
<script type="text/javascript">
/*
This is the url to the script there will check if the domain is available.
The script needs to output for example Available or Unavailable, echo can be used for that.
The output from the script will be added to table-cell next to the domain being checked.
The domain is added as a parameter to the url eg: /test/avail.php?domain=thedomaintocheck.com
*/
var availSriptURL = "/test/avail.php";
function switchXHRState()
{
if(this.readyState == 4)
{
this.callback.apply(this, this.arguments);
}
}
function loadFile (sURL, fCallback, argumentToPass1)
{
var oXHR = new XMLHttpRequest();
oXHR.callback = fCallback;
oXHR.arguments = Array.prototype.slice.call(arguments, 2);
oXHR.onreadystatechange = switchXHRState;
oXHR.open("GET", sURL, true);
oXHR.send(null);
}
function insertDomainAvailToPage(mNumber)
{
document.getElementById("dmnm" + mNumber + "avail").innerHTML = this.responseText;
//if unavail is in the response, make text red
if(document.getElementById("dmnm" + mNumber + "avail").innerHTML.toLowerCase().indexOf("unavail") > -1)
{
document.getElementById("dmnm" + mNumber + "avail").style.color = "red";
}
}
for(var a = 1; a != 101; a++)
{
if(typeof document.getElementById("dmnm" + a) != "undefined")
{
loadFile(availSriptURL + "?domain=" + document.getElementById("dmnm" + a).innerHTML, insertDomainAvailToPage, a);
}
else
{
break;
}
}
</script>
</body>
</html>
It will make asynchron requests for the domains listed in the table, acording to the ids of the table-cells, i hope you can see where i am going with the script.
For testing i used this code as avail.php:
Code:
<?php
$domain = $_GET["domain"];
if($domain == "domain2.com")
{
echo $domain." is available";
}
else
{
echo $domain." is unavailable";
}
?>
It does not check if the domain is avaiable, but you will need to create a script there checks if the domain is available and output the text that the javascript will insert to the cell next to the domain.