Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of NHM TAnveer Hossain Khan  >  .BD whois lookup  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Example script
Class: .BD whois lookup
Query a whois service for a domain from Bangladesh
Author: By
Last change:
Date: 2005-03-20 10:33
Size: 1,431 bytes
 

Contents

Class file image Download
<?php

/*
    This Script will show
    how to use BDWhois class
    @author NHM Tanveer Hossain Khan (Hasan)
    @link mailto:admin@we4tech.com
    @link http://we4tech.com
*/

/* required lib */
require 'bdwhois.class.php';

/*
    STEP 1:
        init class
    STEP 2:
        set domain name
*/
if(empty($_REQUEST['domain']))
    
$bdWhois=new BDWhois("apexholdings.com.bd");
else
    
$bdWhois=new BDWhois($_REQUEST['domain']);

/* get result */
$bdResult=$bdWhois->getResult();

/* show your data */
printf("<b>Company Name:</b> %s<br />",$bdResult->getNameOfOrganization());
printf("<b>Company Address:</b> %s<br />\r\n",$bdResult->getAddress());
printf("<b>Email:</b> %s<br />",$bdResult->getEmail());
printf("<b>Telephone:</b> %s<br />",$bdResult->getTelephone());
echo 
"<h4>Etc........Enjoy..........</h4>";



/* Now Laugh :-)) L0L */
?>


<!-- Form for BD Whois search -->
<form action="" method='get'>
   <b>Domain Name:</b> <input type="text" name="domain" value="" />
</form>
<!-- END FORM -->


<!-- Source Code -->
<hr />
<a href="?show_class">Show BDWhois.class.php source code</a><br/>
<a href="?show">Show test.php source code</a><br/>

<?php
/* check for source */
if(array_key_exists("show_class",$_REQUEST)) {

  
/* highlight class */
  
highlight_file("bdwhois.class.php");
}
else if(
array_key_exists("show",$_REQUEST)){

  
/* highlight test */
  
highlight_file("test.php");
}
?>