正在显示
1 个修改的文件
包含
22 行增加
和
22 行删除
| @@ -831,7 +831,7 @@ if (!function_exists('curlGet')) { | @@ -831,7 +831,7 @@ if (!function_exists('curlGet')) { | ||
| 831 | function curlGet($url) | 831 | function curlGet($url) |
| 832 | { | 832 | { |
| 833 | $ch1 = curl_init(); | 833 | $ch1 = curl_init(); |
| 834 | - $timeout = 60; | 834 | + $timeout = 10; |
| 835 | curl_setopt($ch1, CURLOPT_URL, $url); | 835 | curl_setopt($ch1, CURLOPT_URL, $url); |
| 836 | curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); | 836 | curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); |
| 837 | curl_setopt($ch1, CURLOPT_ENCODING, ''); | 837 | curl_setopt($ch1, CURLOPT_ENCODING, ''); |
| @@ -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) { |
-
请 注册 或 登录 后发表评论