我有这个脚本,它需要一个带有不同链接和 url 的 txt 文件。并且此脚本会检查 .txt 文件中的链接上存在的反向链接。我的脚本是这样的
<?php
$needle = $_GET['utext'];
$file = $_GET['ufile'];
$source = file_get_contents($file);
$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","\n".$found)."\n";
echo "<br> <br> <br> <br>";
echo "Matches that were not found \n". implode("\n","\n".$notfound);
?>