- <?php
- $doman = $argv[1];
- $port = $argv[2];
- $file = file("url.text");
- $file_arr = array();
- foreach($file as &$line){
- $file_arr[] = trim($line);
- }
- //print_r($file_arr);
- $time1 = time();
- for($i=0; $i<100000; $i++){
- $random = rand(0,189);
- $rand_url = 'http://'.$doman.':'.$port.$file_arr[$random];
- $content = file_get_contents($rand_url);
- }
- $time2 = time();
- echo $time2 - $time1;
- echo "\\n";
- //该片段来自于http://www.codesnippet.cn/detail/290720134864.html
来源: http://www.codesnippet.cn/detail/290720134864.html