PHP Classes

File: whois/index.php

Recommend this page to a friend!
  Classes of Keshav Mishra   Domain Lookup   whois/index.php   Download  
File: whois/index.php
Role: Example script
Content type: text/plain
Description: Demonstrate how to use this class.
Class: Domain Lookup
Check whether a domain is registered or available
Author: By
Last change:
Date: 14 years ago
Size: 1,426 bytes
 

Contents

Class file image Download
<?php
include "whois.php";
$whois = new whois;
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" href="favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Domain LookUp Script by Keshav Mishra</title>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="lib/prototype.js"></script>
<script type="text/javascript" src="lib/scriptaculous.js?load=effects"></script>
<link href="css/style.css" media="screen" rel="stylesheet" />
</head>
<body>
    <center>
        <form action="" name="whois" id="whois" method="post" onsubmit="getResult('whois', 'resultDiv', 'whois.php'); return false;">
            <strong>www.</strong>
            <input type="text" size="30" maxlength="61" name="domain" id="domain"/>
            <select name="domain_ext" id="domain_ext">
            <?php
           
foreach($whois->ext as $ext=>$url){
                if(
$ext == '.com'){
                    echo
"<option name='$ext' selected='selected'>$ext</option>";
                }else{
                    echo
"<option name=$ext>$ext</option>";
                }
            }
           
?>
</select>
            <input type="button" name="search" value="Search" onclick="getResult('whois', 'resultDiv', 'whois.php'); return false;"/>
        </form><br>
    <div id="resultDiv"></div>
    </center>
</body>
</html>