whois lookup need help
Posted: Fri Jul 02, 2010 10:19 am
Hi
Im a newbie developer and am trying to setup a simple page for a whoislookup query
I need it to show results on another page and am struggling as i cant find any decent explainations on the net ALL HELP will be GREATLY appreciated and any direction as to good sources of material that could help me understand this better would be awesome THanks -
Heres my code so far
whois.php - page
Im a newbie developer and am trying to setup a simple page for a whoislookup query
I need it to show results on another page and am struggling as i cant find any decent explainations on the net ALL HELP will be GREATLY appreciated and any direction as to good sources of material that could help me understand this better would be awesome THanks -
Heres my code so far
whois.php - page
Code: Select all
<php>
<html>
<body>
<h1 style="text-align:center;">Multiple whois lookup query</h1></center>
<P style="text-align:center;">This app is used to check for available FQDN's.</P>
<P style="text-align:center;">PLease enter one suggested domain name per field.</P>
<center><form action = "results.php" method= "post">
<input type="text" name="Domainname"/></br>
<input type="text" name="Domainname1"/></br>
<input type="text" name="Domainname2"/></br>
<input type="text" name="Domainname3"/></br>
<input type="text" name="Domainname4"/></br>
<input type="text" name="Domainname5"/></br>
<input type="text" name="Domainname6"/></br>
<input type="text" name="Domainname7"/></br>
<input type="text" name="Domainname8"/></br>
<input type="text" name="Domainname9"/></br>
<input type="text" name="Domainname10"/></br>
</br>
<input type="submit" value="Check availability"/>
</form></center>
<?php
$domain = $_REQUEST['domain'];
$output = shell_exec(“whois $domain”);
echo $output;
?>
</font>
</body>
</html>
</php>
Results.php page
<?php
$result = shell_exec('whois ' . $_POST["Domainname" ] )
$tidy_result = str_replace("\n","<br>",$result);
echo $tidy_result;
?>!<br />
<?php echo $_POST["Domainname1"]; ?>!<br />
<?php echo $_POST["Domainname2"]; ?>!<br />
<?php echo $_POST["Domainname3"]; ?>!<br />
<?php echo $_POST["Domainname4"]; ?>!<br />
<?php echo $_POST["Domainname5"]; ?>!<br />
<?php echo $_POST["Domainname6"]; ?>!<br />
<?php echo $_POST["Domainname7"]; ?>!<br />
<?php echo $_POST["Domainname8"]; ?>!<br />
<?php echo $_POST["Domainname9"]; ?>!<br />
<?php echo $_POST["Domainname10"]; ?>!<br />