Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2002
    Posts
    234

    PHP Domain Availability Checking

    Hello -

    I've searched around the forum looking for what I am trying to accomplish but I'm not having much luck. Basically I just need some code that will tell me if a domain has been registered or if it is free for registration for the following extensions:

    .com, .net, .org, .ws, .info, .biz, and .us would be nice too.

    If you know of just a simple function or have some code for me to accomplish this I would be most greatful.

    Thanks much!
    Ben Hughes

  2. #2
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    324
    Hello,

    We use WhoIS script from www.mattsscripts.co.uk

    --------------------

    Matt's Whois is a professional domain name whois query script written to allow visitors to a website to quickly and reliably check the status of almost any top level domain. Many websites are already using this script for their whois lookups, why don't you?
    This script also contains a fully configurable and customizable template system where by the script can seemlessly integrate into the existing website, bundle this with the ability to query about 270 different top level domains and the quality of a commercial product shows exactly why Matt's Whois is being used by more web sites every single day!
    There have been quite a few changes to Matt's Whois recently involving a few movements within the template system meaning that any existing templates will require a bit of a "juggle" (e-mail me for help on this!), so other templates that can be used are available for download just below, simply extract them into a sub-directory in the same directory as the main script (either mwhois.cgi or mwhois.php). There is an administration script included for (hopefully) easy configuration of the various sections. Both versions of the script come bundles and configured with the default english templates.

    --------------------

  3. #3
    Join Date
    Jun 2002
    Posts
    234
    Hi -

    Thanks for the reply but I'm not looking for anything with a GUI - I'll be writing my own interface and I just need a function or some code I can use to check to see if one is registered for a variety of extensions.

    Ben

  4. #4
    Join Date
    Oct 2002
    Location
    Houston, Tx
    Posts
    12
    http://www.icewalkers.com/doclib/how...-HOWTO-28.html

    // domain is like "phpwizard.net"
    function whois($domain, $server="whois.internic.net")
    {
    $fp = fsockopen ($server, 43, &$errnr, &$errstr) or die("$errno: $errstr");
    fputs($fp, "$domain\n");
    while (!feof($fp))
    echo fgets($fp, 2048);
    fclose($fp);
    }

    You could probably use a eregi() and check for availability.

  5. #5
    Join Date
    Jul 2002
    Location
    Alberta, Canada
    Posts
    348
    there are several php whois classes floating around, hotscripts.com is sure to have at least one.
    AC Host Canada – Affordable Canadian Web Hosting Solutions
    Shared Hosting | Email Hosting | DNS Hosting | Custom Plans Available
    Website: www.achost.ca email: info@achost.ca

  6. #6
    Join Date
    Sep 2002
    Location
    London/Edinburgh
    Posts
    1,131
    Europhase UK Limited - XEN/OpenVZ UK/US Virtual Private Servers | R1Soft Backups for Web Hosts
    Custom R1Soft Backups | UK/US Web Hosting | UK/US Virtual Private Servers
    99.9% Uptime SLA | Non Overloaded Service | Guaranteed Ram / Resources
    Company: SC345142 VAT: GB-947754180 Tel: 0870 4710 895

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •