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! Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/ 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. Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-177782 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... Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-177788 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... Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-177806 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! Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-178006 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! Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-178016 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. Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-178050 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! Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-178397 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). Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-178468 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! Link to comment https://forums.phpfreaks.com/topic/37203-solved-check-domain-availability/#findComment-179270 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.