<?php
$url = 'http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=baidu.com';//.$_GET['area_domain'];
$contents = file_get_contents($url);
$xml = simplexml_load_string($contents);
if (!empty($xml)) {
switch($xml->original)
{
case '210 : Domain name is available':$result='域名可以注册';break;
case '211 : Domain name is not available':$result='域名已经注册';break;
case '212 : Domain name is invalid':$result='域名参数传输错误';break;
case '214 : Unknown error' :$result='未知错误';break;
}
}
echo iconv("gb2312", "utf-8",$result);
?>