作者 刘锟

update

@@ -1106,27 +1106,27 @@ if (!function_exists('check_domain_record')) { @@ -1106,27 +1106,27 @@ if (!function_exists('check_domain_record')) {
1106 $is_record = true; 1106 $is_record = true;
1107 } 1107 }
1108 1108
1109 -// if (!$is_record) {  
1110 -// //解析不正确,再判断是否开启cnd  
1111 -// $top_domain = getTopDomain($domain);  
1112 -// $cnd = curlGet('http://sitebak.globalso.com/get_records?domain=' . $top_domain);  
1113 -// if (isset($cnd['data']) && $cnd['data']) {  
1114 -// if ($domain == $top_domain || substr($domain, 0, 4) == 'www.') {  
1115 -// $check_domain = $domain;  
1116 -// } else {  
1117 -// $check_domain = '*.' . $top_domain;  
1118 -// }  
1119 -// foreach ($cnd['data'] as $vc) {  
1120 -// if ($vc['name'] == $check_domain && $vc['type'] == 'A' && $vc['content'] == $server_info['ip']) {  
1121 -// $is_record = true;  
1122 -// break;  
1123 -// } elseif ($vc['name'] == $check_domain && $vc['type'] == 'CNAME' && $vc['content'] == $server_info['domain']) {  
1124 -// $is_record = true;  
1125 -// break;  
1126 -// }  
1127 -// }  
1128 -// }  
1129 -// } 1109 + if (!$is_record) {
  1110 + //解析不正确,再判断是否开启cnd
  1111 + $top_domain = getTopDomain($domain);
  1112 + $cnd = curlGet('http://sitebak.globalso.com/get_records?domain=' . $top_domain);
  1113 + if (isset($cnd['data']) && $cnd['data']) {
  1114 + if ($domain == $top_domain || substr($domain, 0, 4) == 'www.') {
  1115 + $check_domain = $domain;
  1116 + } else {
  1117 + $check_domain = '*.' . $top_domain;
  1118 + }
  1119 + foreach ($cnd['data'] as $vc) {
  1120 + if ($vc['name'] == $check_domain && $vc['type'] == 'A' && $vc['content'] == $server_info['ip']) {
  1121 + $is_record = true;
  1122 + break;
  1123 + } elseif ($vc['name'] == $check_domain && $vc['type'] == 'CNAME' && $vc['content'] == $server_info['domain']) {
  1124 + $is_record = true;
  1125 + break;
  1126 + }
  1127 + }
  1128 + }
  1129 + }
1130 1130
1131 return $is_record; 1131 return $is_record;
1132 } catch (\Exception $e) { 1132 } catch (\Exception $e) {