diff --git a/README.md b/README.md index f62827d..c4d657c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 検索オンライン 1.0.1 +# 検索オンライン 1.0.2 日本産検索エンジン。 diff --git a/config.sample.php b/config.sample.php index 5e2a1b6..e174838 100644 --- a/config.sample.php +++ b/config.sample.php @@ -1,7 +1,7 @@ URL is not limited to "http" or "https" to TLD. Please change.'; return $err; } @@ -40,12 +40,6 @@ return $err; } - // ウエブページが移転されているかどうか - $out = execcurl($url); - if ($httpcode >= 301 && $httpcode <= 399) { - $err[] = 'ウェブサイトは移転されているみたいです。直接URLをご入力下さい。
The website seems to have been relocated. Please enter the URL directly.'; - } - // ブラフレを使っているかどうかチェック if (!is_null(shell_exec('whois '.get_domain($url).' | grep -i "cloudflare" 2>&1'))) { $err[] = 'ウェブサイトはCloudFlareを使っているみたいです。追加依頼拒否。
The website seems to be using CloudFlare. Rejection of additional request.'; @@ -57,7 +51,8 @@ } // DOCTYPE htmlタグがあるかどうかチェック - $out = execcurl($url, 'cout'); + $out = execcurl($url, 'cout', false, false, false); +dd($out); if (strpos($out, 'The website does not include the "! DOCTYPE html" tag.'; } @@ -81,7 +76,9 @@ curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:9050'); curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); } + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_MAXREDIRS, 3); curl_setopt($ch, CURLOPT_TIMEOUT, 10); $output = curl_exec($ch); $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);