我的主要任务是验证我的网站的反向链接是否存在,这通过 some.txt 文件进行验证。我已经做到了,但现在的问题是,我想要表格格式的网址。
我的剧本是这样的
$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",$found)."\n";
echo "Matches that were not found \n". implode("\n",$notfound);