Today to others to do the site when there is a need to have a domain name query function, check out a bit of information to write a simple query function
The front page uses a checkbox with the following code:
Copy CodeThe code is as follows:
PHP Code:
Copy CodeThe code is as follows:
Get top-level domains
$ext =$_post[' ext '];
Get a Level two domain name
$dns = $_post[' DNS '];
Print_r ($ext);
$domain = $dns. "." . $ext [0];
Echo $domain;
Traverse all the Domains
foreach ($ext as $value) {
Combined Domain name
$domain = $dns. "." . $value;
Inquire:
Echo $domain;
$do = "http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=". $domain;
$xml _data = file_get_contents ($do);
$result _arr = (array) simplexml_load_string ($xml _data);
$returncode = $result _arr[' ReturnCode ');
$key = $result _arr[' key '];
$original = $result _arr[' original ');
$status = substr ($original, 0, 3);
if ($status = = "210") {
echo ": Congratulations, you can register";
}else if ($status = = "211") {
echo ": Already registered";
}else if ($status = = "212") {
echo ": Parameter Error";
}
Echo '
';
}
?>
http://www.bkjia.com/PHPjc/326229.html www.bkjia.com true http://www.bkjia.com/PHPjc/326229.html techarticle today to others to do the site when there is a need to have a domain name query function, check out a bit of information to write a simple query function front page with a checkbox, code as follows: Copy code code such as ...