このコミットが含まれているのは:
守矢諏訪子 2022-06-05 20:56:51 +09:00
コミット 1217dfbe8e
3個のファイルの変更7行の追加10行の削除

ファイルの表示

@ -1,4 +1,4 @@
# 検索オンライン 1.0.1
# 検索オンライン 1.0.2
日本産検索エンジン。

ファイルの表示

@ -1,7 +1,7 @@
<?php
define('SITE_NAME', '検索オンライン');
define('SITE_NAME_EN', 'Kensaku Online');
define('VERSION', '1.0');
define('VERSION', '1.0.2');
define('IMAGE_SOURCES', []);
define('VIDEO_SOURCES', ['video.076.ne.jp', 'youtube.076.ne.jp', 'odysee.076.ne.jp']);
define('ARCHIVER', 'hozon.site');

ファイルの表示

@ -29,7 +29,7 @@
$err = [];
// ホスト名のみかどうかチェック
if (isurl($url)) {
if (!isurl($url)) {
$err[] = 'URLは「http」又は「https」からTLDまでのみではありません。ご変更下さい。<br />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をご入力下さい。<br />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を使っているみたいです。追加依頼拒否。<br />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, '<!DOCTYPE html') === false) {
$err[] = 'ウェブサイトは「!DOCTYPE html」タグを含めていません。<br />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);