Login   Register  
PHP Classes
elePHPant
Icontem

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Giulio Bai  >  DCHK  >  example2.php  >  Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Example #2
Class: DCHK
Check the availability of a domain name with whois
Author: By
Last change:
Date: 2007-03-21 09:54
Size: 668 bytes
 

Contents

Class file image Download
<?php
if (isset($_POST['submit'])) {
    
$domain $_POST['domain'];
    
$ext $_POST['extension'];
    
$full_name $domain '.' $ext;

    include_once(
'dchk.php');

    
$free = new DCHK();
    if(
$free->check_domain("example.com, , , 1")) // Prints the register link also<br />
} else {
?>
    <form method="post">
        Check for a domain name:
        <input type="text" name="domain" />
        <select name="extension">
            <option value="com">.com</option>
            <option value="org">.net</option>
            <option value="net">.org</option>
            <option value="biz">.biz</option>
        </select>
        <br />
        <input type="submit" name ="submit" value="Check now!"/>
    </form>
<?

}

?>