? Query whether there is a domain name functionSearchDomain ($ domainName) {judge whether the domain name is legal, I am not familiar with the regular expression, the friend has details, please refer to me for a read: -) if (! Eregi (*. *, $ domainName) {$ re [0] the domain name can only consist of letters, numbers, and "-" (minus signs on the keyboard), and the maximum length is 2
// Query whether a domain name exists
Function SearchDomain ($ domainName ){
// Determine whether the domain name is legal. I am not familiar with the regular expression. if that friend has more details, please refer to the following link :-)
// If (! Eregi ("*. *", $ domainName )){
// $ Re [0] = "the domain name can only contain letters, numbers, and"-"(minus signs on the keyboard). The maximum length is 26 characters.
Enter the domain name in the correct format! ";
// $ Re [1] = "the domain name does not meet the requirements! ";
// Return $ re;
//}
$ Name = strtolower ($ domainName); // small Write
If (strpos ($ name, ". cn") // if it contains a domestic domain name
$ Command = "whois-h whois.cnnic.net.cn ";
Else
$ Command = "whois ";
For ($ I = 0; $ I $ Result. = $ whoisResult [0] [$ I]."
";
$ Re [0] = $ I <30? "This domain name has not been registered. please register now! ":" This domain name has been registered by other organizations! ";
$ Re [1] = $ result;
Return $ re;
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.