Home  >  Article  >  Backend Development  >  PHP gets http-header to determine whether the file exists_PHP tutorial

PHP gets http-header to determine whether the file exists_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:47:001050browse

I want to use PHP to write a file detection, but unfortunately I found that PHP is single-threaded and very slow. I will record it first and modify it when I come back at night.

set_time_limit(0);

$file = 'PHP.txt';

$content = file_get_contents($file);

//echo $content;

$array = explode("rn", $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 ''.'The file exists
';

echo 'scan is finish';

} else {

}

}

?>

Fixed link to this article: http://www.xssxss.com/fuck/325.xss | Shine’s Holy Paradise-〃Min〃

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478543.htmlTechArticleI want to use PHP to write a file detection, but unfortunately I found that PHP is single-threaded and very slow. Record it first and revise it when I come back tonight. ?php set_time_limit(0); $file = PHP.txt; $conte...