コミット
1217dfbe8e
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
define('SITE_NAME', '検索オンライン');
|
define('SITE_NAME', '検索オンライン');
|
||||||
define('SITE_NAME_EN', 'Kensaku Online');
|
define('SITE_NAME_EN', 'Kensaku Online');
|
||||||
define('VERSION', '1.0');
|
define('VERSION', '1.0.2');
|
||||||
define('IMAGE_SOURCES', []);
|
define('IMAGE_SOURCES', []);
|
||||||
define('VIDEO_SOURCES', ['video.076.ne.jp', 'youtube.076.ne.jp', 'odysee.076.ne.jp']);
|
define('VIDEO_SOURCES', ['video.076.ne.jp', 'youtube.076.ne.jp', 'odysee.076.ne.jp']);
|
||||||
define('ARCHIVER', 'hozon.site');
|
define('ARCHIVER', 'hozon.site');
|
||||||
|
|
13
helper.php
13
helper.php
|
@ -29,7 +29,7 @@
|
||||||
$err = [];
|
$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.';
|
$err[] = 'URLは「http」又は「https」からTLDまでのみではありません。ご変更下さい。<br />URL is not limited to "http" or "https" to TLD. Please change.';
|
||||||
return $err;
|
return $err;
|
||||||
}
|
}
|
||||||
|
@ -40,12 +40,6 @@
|
||||||
return $err;
|
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'))) {
|
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.';
|
$err[] = 'ウェブサイトはCloudFlareを使っているみたいです。追加依頼拒否。<br />The website seems to be using CloudFlare. Rejection of additional request.';
|
||||||
|
@ -57,7 +51,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// DOCTYPE htmlタグがあるかどうかチェック
|
// DOCTYPE htmlタグがあるかどうかチェック
|
||||||
$out = execcurl($url, 'cout');
|
$out = execcurl($url, 'cout', false, false, false);
|
||||||
|
dd($out);
|
||||||
if (strpos($out, '<!DOCTYPE html') === false) {
|
if (strpos($out, '<!DOCTYPE html') === false) {
|
||||||
$err[] = 'ウェブサイトは「!DOCTYPE html」タグを含めていません。<br />The website does not include the "! DOCTYPE html" tag.';
|
$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_PROXY, '127.0.0.1:9050');
|
||||||
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
|
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
|
||||||
}
|
}
|
||||||
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_MAXREDIRS, 3);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||||
$output = curl_exec($ch);
|
$output = curl_exec($ch);
|
||||||
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
$httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
|
|
新しいイシューから参照