Fedora Linux Support Community & Resources Center
Old 25th September 2011, 02:50 PM
glway Offline
Registered User
Join Date: Sep 2011
Posts: 44
Whois command line

Hi guys. Not to waste much of your time-i have a simple question more or less-im making a whois website, running on a fedora server. and what I need is a shell whois command which will check the domain and return a simple registered/unregistered or true/false or something like that so it will be easier to manipulate with php. thanks.
Reply With Quote
Old 25th September 2011, 08:47 PM
Firewing1 Offline
Registered User
Join Date: Dec 2004
Location: Canada
Age: 26
Posts: 9,224
Re: Whois command line

You could do this in many ways, the easiest is probably just to run "whois domain.tld" in the shell and then have PHP apply regular expressions on the command output to determine if it is registered or not. There is actually a fairly complete example of this in the user comments on the PHP shell_exec() manual page:

You could do something similar to extract the registrant information when the domain exists, or return a simple "no match" page when the domain is unregistered.
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
Old 18th October 2011, 08:48 AM
linuxwin2k Offline
Registered User
Join Date: Oct 2011
Posts: 41
Re: Whois command line

Here another php example
Reply With Quote

command, line, whois

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Current GMT-time: 04:16 (Wednesday, 23-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat