The zip file contains several files as follows.
cwhois.php contains the cwhois function and support functions. You should include this in your pages.
checkdomain.php demo page that checks a freely entered domain name.
checkdomain2.php demo page that checks a domain name with a drop down list of any extensions you wish to accept.
checkdomain3.php demo page that uses checkboxes to check several domains simultaneously. (also requires with whois.php)
lookup.php demo page that displays directly the domain na
me registration information.
whois.php is used with checkdomain3.php to show registration details.
Using cWhois couldn t be easier. Just include the cwhois.php file in your page. Here is a sample php call:-
$result=cWhois($domain, $extension, $details);
$domain contains the domain to lookup such as yourdomain.com.
$extension optionally contains the domain extension such as .com if not included in $domain
$details is used to receive the returned registration details for the domain owner.
$result contains the functions return status:-
0=Domain is not registered and therefore should be available for registration.
1=Domain is registered. $details contains the registration details.
2=Domain extension not recognised or supported.
3=Domain name is not valid.
4=Referer is not allowed to use function. You can set this if required to control use.
5=Could not contact registry to lookup domain.
6=Domain is available at a premium (currently supported for .tv, .fm & .dj). Last line of $details should contain offered price.
Ther $allowed variable can be set to ensure that the call can only be made from a known server.
You can set $allowed="" to disable this security check.
Please note that if you change the filename for any of the demo pages you must rename
all occurences of it in the script to match.
Some domains that are supported by cWhois such as .my, .gr, .es, .sa, .tv, .fm and .dj have no official whois server and we
therefore try to get the details via the registrars website whois service. This may result in loss of service if they make changes
or block access. For this reason you should regularly check that you installation of cWhois is working and report any problems
If you are just checking availability and do not require the full whois details then you can speed up the function call with
some domain extensions by setting $details="*"; before calling cWhois.
If you have any questions please email us.