php获取http-header来判断文件是否存在_PHP教程

原创
2016-07-13 17:47:00 775浏览

想要用php写个文件探测的,可是悲剧的发现php是单线程的,速度很慢,先记录下,晚上回来在修改。

set_time_limit(0);

$file = 'PHP.txt';

$content = file_get_contents($file);

//echo $content;

$array = explode("\r\n", $content);

//print_r($array);

$url = 'http://xssxss.com';

for($i=0; $i

{

$header_array = get_headers ( $url.$array[$i] );

if ($header_array [0] == 'HTTP/1.1 200 OK') {

echo ''.'文件存在';

echo 'scan is finish';

} else {

}

}

?>

本文固定链接: http://www.xssxss.com/fuck/325.xss | Shine的圣天堂-〃敏〃

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478543.htmlTechArticle想要用php写个文件探测的,可是悲剧的发现php是单线程的,速度很慢,先记录下,晚上回来在修改。 ?php set_time_limit(0); $file = PHP.txt; $conte...
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。