我的主要任务是,验证我的网站的反向链接是否存在,通过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);