eutu9 Posted February 5, 2007 Share Posted February 5, 2007 I want to wite a PHP script to Check Domain Availability ! I tried to use checkdnsr function! But it doesn't works for all types of dns records. The default option is "MX". if (checkdnsr($x,"ANY")){ echo "The domain is not available!"; } else { echo "The domain si available!"; } Is this correct ? It doesn't works! If I enter an available record to search it says: "the domain is not available"! Why ( ? Could you give me another script ? Or some tutorials! pls :S Thanks! Quote Link to comment Share on other sites More sharing options...
the_oliver Posted February 5, 2007 Share Posted February 5, 2007 Some regesterd domains wont have a valied DNS record attached! May just be held, or pointing to a server with no record. The only way to acuratly check domain avalibility is through the use of a 'whois' server. checkdnsr is for domains with a record, not for the porpos your using it for. Hope this helps. Quote Link to comment Share on other sites More sharing options...
troy_mccormick Posted February 5, 2007 Share Posted February 5, 2007 I guess you could always just try to pull down the index page using the file() function... I don't know if that is the most secure way of doing it...but I think it would work... Quote Link to comment Share on other sites More sharing options...
the_oliver Posted February 5, 2007 Share Posted February 5, 2007 Still would not find domains that dont have a DNS record, or even domains without an A-record, or who use somethingelse.html rather than index.html etc... Quote Link to comment Share on other sites More sharing options...
eutu9 Posted February 6, 2007 Author Share Posted February 6, 2007 Thank you 4 your help falks! Now, next question! For each top level domain I have to query another server? For example: for .com domains i have to query networksolutions.com .... Can I find a server to query all top leve domains ? Thx! Quote Link to comment Share on other sites More sharing options...
eutu9 Posted February 6, 2007 Author Share Posted February 6, 2007 I've found a class that contains a search() functions for dns records ! http://builder.com.com/5100-6371-5234651.html Check it out! And tell me your opinion. Thx! Quote Link to comment Share on other sites More sharing options...
the_oliver Posted February 6, 2007 Share Posted February 6, 2007 Server for all top level domains is a whois server. Hundreds out there. Quote Link to comment Share on other sites More sharing options...
eutu9 Posted February 6, 2007 Author Share Posted February 6, 2007 Can you give me a few examples of whois servers ? thx! Quote Link to comment Share on other sites More sharing options...
the_oliver Posted February 6, 2007 Share Posted February 6, 2007 Not realy! Sorry! I dont know of any free ones, due to the amount of trafic they would get. However whoever you bying your domains from will probaby provide one. Often there used in conjunction with fopen(). Sorry i cant help more with that. Whois is realy the only way to do it acuratly tough. (after though. If your running unix based OS, type whois adomain.com into the prompt. Perhaps you can feed it through this way). Quote Link to comment Share on other sites More sharing options...
eutu9 Posted February 7, 2007 Author Share Posted February 7, 2007 Thank you! You helped me a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.