Skip to content

Instantly share code, notes, and snippets.

@berkes
Last active December 22, 2015 09:28
Show Gist options
  • Save berkes/6451816 to your computer and use it in GitHub Desktop.
Save berkes/6451816 to your computer and use it in GitHub Desktop.
Siege
<?php
$data = "";
for ($i = 0; $i < 52000; $i++) {
$data .= "X";
}
for ($i = 0; $i < 1000; $i++) {
$name = uniqid("siege-") . ".php";
$fp = fopen($name, 'w');
fwrite($fp, "<?php echo \"file {$i} {$name}\"; /** {$data} **/ ?>");
fclose($fp);
}
<?php
foreach(glob("siege-*.php") as $file) {
require_once $file;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment