本帖最后由 jjf012 于 2012-6-19 10:12 编辑
<?php
$s="你的网址";//比如baidu.com即可
$file = 'url.txt';
$content = file_get_contents($file);
$array = explode("\r\n", $content);
//Output a line of the file until the end is reached
foreach($array as &$line){
echo "http://".$line.$s."\r\n";
$ock=@get_headers('http://'.$line.$s);
if(!$ock){
echo "faild!\r\n";
}
else
{
echo "success!\r\n";
$site_list = file('site.txt');
if (in_array("http://".$line.$s."\r\n", $site_list)){
echo "[-] Links repeat\n";
}else{
$fp = @fopen('site.txt', 'a');
@fwrite($fp,"http://".$line.$s."\r\n");
@fclose($fp);
}
}
}
?>
{:4_51:} 自己试着试着写出来了。
url.txt放比如www.这种格式的。每行回车。