some.txt ファイルを受け取り、リンクを読み取り、ウェブサイトのバックリンクがあるかどうかを返すスクリプトがあります。しかし、問題は、それが非常に遅いことです。私はその速度を上げたいと思っています。その速度を上げる方法はありますか?
<?php
ini_set('max_execution_time', 3000);
$source = file_get_contents("your-backlinks.txt");
$needle = "http://www.submitage.com"; //without http as I have imploded the http later in the script
$new = explode("\n",$source);
foreach ($new as $check) {
$a = file_get_contents(trim($check));
if (strpos($a,$needle)) {
$found[] = $check;
} else {
$notfound[] = $check;
}
}
echo "Matches that were found: \n ".implode("\n",$found)."\n";
echo "Matches that were not found \n". implode("\n",$notfound);
?>