Home > php教程 > php手册 > php获取http-header来判断文件是否存在

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:45:31
Original
1754 people have browsed it

 

想要用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的圣天堂-〃敏〃

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template