Zend - The PHP Company




Miscellaneous

Add Code


Whois in Browser  

Type: code fragment
Added by: nailufar
Entered: 28/08/2001
Last modified: 01/11/2000
Rating: - (fewer than 3 votes)
Views: 4440
you can look up domain which you need it.


Look up domain name using WHOIS:
<form method="POST" action="<?print $PHP_SELF?>">
    <input type="text" name="url" size="20">
    <input type="submit" name="submit" value="Search">
</form>
<hr size="1" widht="98%">

<?
    
if ($REQUEST_METHOD == "POST") {
    
// make sure data from input
    
$url escapeshellcmd($url);
    if (empty(
$url)) die("you must spesification your URL");

    
exec("whois $url",$array);    
    foreach(
$array as $thisLine) {
        print 
$thisLine "<br>";
    }
    }    
?>


Usage Example


Look up domain name using WHOIS:
<form method="POST" action="<?print $PHP_SELF?>">
    <input type="text" name="url" size="20">
    <input type="submit" name="submit" value="Search">
</form>
<hr size="1" widht="98%">

<?
    
if ($REQUEST_METHOD == "POST") {
    
$url escapeshellcmd($url);
    if (empty(
$url)) die("you must spesification your URL");
    
exec("whois $url",$array);
    
    foreach(
$array as $thisLine) {
        print 
$thisLine "<br>";
    }
    }    
?>


Rate This Script





Search



This Category All Categories