Logo         Community
The Company
Your Account
Contact Us
Networking With PEAR
Trawl the archives for PHP versions of common networking tools

| Doctor Who |

Want to create a Web-based interface to look up domain records? It's easy to do with the Net_Whois package, which can look up information on any registered Internet domain. You can download and install this package from http://pear.php.net/package/Net_Whois; once you've got it installed, give it a spin with the following script:

// include class

// initialize object
$whois = new Net_Whois();

// perform WHOIS query
$result = $whois->query("example.com");

You can easily modify the previous script to create an application that allows the user to enter a domain name for online WHOIS lookup. Here's how:

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    Doman name: <input type="text" name="q">
    <input type="submit" name="Look up domain">

if ($_POST['q']) {
    // include class

    // initialize object
    $whois = new Net_Whois();

    // perform WHOIS query
    $result = $whois->query($_POST['q']);


Here the domain name submitted by the user is passed to the object's method. This query() method then requests the domain record from the appropriate domain registrar, and displays the response as a Web page.

How to do Everything with PHP & MySQL
How to do Everything with PHP & MySQL, the best-selling book by Melonfire, explains how to take full advantage of PHP's built-in support for MySQL and link the results of database queries to Web pages. You'll get full details on PHP programming and MySQL database development, and then you'll learn to use these two cutting-edge technologies together. Easy-to-follow sample applications include a PHP online shopping cart, a MySQL order tracking system, and a PHP/MySQL news publishing system.

Read more, or grab your copy now!

previous page more like this  print this article  next page
In trog...
Logging With PHP
Building A Quick-And-Dirty PHP/MySQL Publishing System
Output Buffering With PHP
Date/Time Processing With PHP
Creating Web Calendars With The PEAR Calendar Class
In the hitg report...
Crime Scenes
Animal Attraction
Lord Of The Strings
In boombox...
Patience - George Michael
Think Tank - Blur
My Private Nation - Train
In colophon...
Hostage - Robert Crais
The Dead Heart - Douglas Kennedy
Right As Rain - George Pelecanos
In cut!...
American Chai
The Core
Find out how you can use this article on your own Web site!

Copyright © 1998-2018 Melonfire. All rights reserved
Terms and Conditions | Feedback