Created
March 21, 2012 20:49
-
-
Save benbalter/2152739 to your computer and use it in GitHub Desktop.
Random URL generator for Siege URL files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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