Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Random URL generator for Siege URL files
<PRE>
<?php
/**
* Generates list of random URLs for use with Siege
* Usefull for getting around caching and whatnot
*/
//path to a wp-load file
include( 'trunk/wp-load.php' );
//pass domain, num, and q via get vars
// domain = domain to benchmark
// num = number of random urls to generate
// q = whether to pass random string as query arg or as path
$domain = ( isset( $_GET['domain'] ) ) ? $_GET['domain'] : '';
$num = ( isset( $_GET['num'] ) ) ? (int) $_GET['num'] : 1000;
$q = ( isset( $_GET['noq'] ) ) ? '' : '?';
$domain = trailingslashit( $domain );
for( $i=0; $i < $num; $i++ )
echo $domain . $q . wp_generate_password( 25, false ) . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.