public function domain(){ set_time_limit(0); $url='http://panda.www.net.cn/cgi-bin/check.cgi'; $ziMu=[]; for($i=65;$i<91;$i++){ $ziMu[]=strtolower(chr($i)); } $logPath=$this->app->getRuntimePath(); foreach ($ziMu as $first){ foreach ($ziMu as $second){ foreach ($ziMu as $third){ foreach ($ziMu as $four) { $domain = $first . $second . $third.$four . ".com"; $result = \org\Http::post($url, ['area_domain' => $domain]); if ($result) { $xml = json_decode(json_encode(simplexml_load_string($result)), true); if ($xml['returncode'] == 200 && strpos($xml['original'], '201') !== false) { file_put_contents($logPath . "domain_success_4.log", $domain . "可以注册" . PHP_EOL, FILE_APPEND); } else { file_put_contents($logPath . "domain_error_4.log", $domain . "不可以注册" . PHP_EOL, FILE_APPEND); } } } } } } echo "success"; exit(); }
php实现域名批量查询接口
与本文相关的文章
网友最新评论 (0)
暂无评论