ごめん
このコミットが含まれているのは:
コミット
535504403e
12
helper.php
12
helper.php
|
@ -26,32 +26,32 @@
|
|||
|
||||
// ホスト名のみかどうかチェック
|
||||
if ($url !== parse_url($url, PHP_URL_SCHEME).'://'.parse_url($url, PHP_URL_HOST)) {
|
||||
$err[] = 'URLは「http」又は「https」からTLDまでのみではありません。ご変更下さい。<br />Error: 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.';
|
||||
}
|
||||
|
||||
// ドメインは存在するかどうかチェック
|
||||
if (!isdomainexist($url)) {
|
||||
$err[] = 'このドメイン名は未登録みたいです。<br />Error: This domain name seems to be unregistered.';
|
||||
$err[] = 'このドメイン名は未登録みたいです。<br />This domain name seems to be unregistered.';
|
||||
}
|
||||
|
||||
// ブラフレを使っているかどうかチェック
|
||||
if (!is_null(shell_exec('whois '.get_domain($url).' | grep -i "cloudflare" 2>&1'))) {
|
||||
$err[] = 'ウェブサイトはCloudFlareを使っているみたいです。追加依頼拒否。<br />Error: 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.';
|
||||
}
|
||||
|
||||
// Torブロックのチェック
|
||||
if (!is_null(shell_exec('torsocks curl -s -L '.$url.' | grep "Please stand by, while we are checking your browser...\|We are checking your browser...\|Ray ID" 2>&1'))) {
|
||||
$err[] = 'ウェブサイトはTorで接続出来ないみたいです。追加依頼拒否。<br />Error: The website doesn\'t seem to be able to connect with Tor. Rejection of additional request.';
|
||||
$err[] = 'ウェブサイトはTorで接続出来ないみたいです。追加依頼拒否。<br />The website doesn\'t seem to be able to connect with Tor. Rejection of additional request.';
|
||||
}
|
||||
|
||||
// DOCTYPE htmlタグがあるかどうかチェック
|
||||
if (is_null(shell_exec('curl -s -L '.$url.' | grep -i "<\!DOCTYPE html" 2>&1'))) {
|
||||
$err[] = 'ウェブサイトは「!DOCTYPE html」タグを含めていません。<br />Error: The website does not include the "! DOCTYPE html" tag.';
|
||||
$err[] = 'ウェブサイトは「!DOCTYPE html」タグを含めていません。<br />The website does not include the "! DOCTYPE html" tag.';
|
||||
}
|
||||
|
||||
// titleタグがあるかどうかチェック
|
||||
if (is_null(shell_exec('curl -s -L '.$url.' | grep -i "<title>" 2>&1'))) {
|
||||
$err[] = 'ウェブサイトは「title」タグを含めていません。<br />Error: The website does not include the "title" tag.';
|
||||
$err[] = 'ウェブサイトは「title」タグを含めていません。<br />The website does not include the "title" tag.';
|
||||
}
|
||||
|
||||
return $err;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
mysqli_stmt_close($site);
|
||||
|
||||
if (is_null($rid)) mysqli_query($mysqli, "INSERT INTO `website` (url) VALUES ('".$h."');");
|
||||
else $err[] = 'このウェブサイトは既に索引中です。<br />Error: This website is already being indexed.';
|
||||
else $err[] = 'このウェブサイトは既に索引中です。<br />This website is already being indexed.';
|
||||
}
|
||||
|
||||
mysqli_close($mysqli);
|
||||
|
|
新しいイシューから参照