if (isset($argv[1])) { $domain = $argv[1]; } else { $domain = @$_POST['domain']; } if ($domain == '') { return; } $ret = array(); #$info = get_whois_info($domain); $query = new Whois($domain); $query->whois_query(); $ret['Ret'] = 0; $ret['RetMsg'] = ""; $ret['BeginDate'] = get_begintime($query); $ret['EndDate'] = get_endtime($query); if ($ret['BeginDate'] == '未收录' && $ret['EndDate'] == '未收录') { $ret['Ret'] = 1; $ret['RetMsg'] = "该域名暂无相关信息<br/>请检查域名填写格式是否正确<br/>(例:不要携带如 ‘www’ 等子域名)"; print_r(json_encode($ret)); return; } $ret['Updated'] = get_updatetime($query); $ret['Nameservers'] = get_nameserver($query); $beginday = $ret['BeginDate']; $endday = $ret['EndDate']; $beginday = str_replace('年', '-', $beginday); $beginday = str_replace('月', '-', $beginday); $endday = str_replace('年', '-', $endday); $endday = str_replace('月', '-', $endday); $beginday = get_mktime($beginday);
$zone_id = $row['id']; $domains[$domain] = $zone_id; } foreach ($domains as $domain => $zone_id) { $query = new Whois($domain); $query->whois_query(); $ret = get_whois_info($domain); #$nameservers = $ret['module']['nameServers']; $nameservers = $query->whois_get_nameserver(); #print_r($nameservers); #$endtime = $ret['module']['standardFormatExpirationDate']; #$endtime=str_replace('年','-',$endtime); #$endtime=str_replace('月','-',$endtime); #$endtime = substr($endtime,0,-3); #$endtime = $endtime." 00:00:00"; $endtime = get_endtime($query); set_domain_whois($zone_id, $endtime); $temp = 0; foreach ($nameservers as $nameserver) { foreach ($eflydns_nsaddr as $eflydns_ns) { if (strcasecmp($nameserver, $eflydns_ns) == 0) { $temp = 1; break; } } if ($temp) { $temp = 1; break; } } if ($temp) {