Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(600);
- error_reporting(E_ALL);
- ini_set('display_errors', TRUE);
- ini_set('display_startup_errors', TRUE);
- function generateRandomString($length = 10) {
- $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $charactersLength = strlen($characters);
- $randomString = '';
- for ($i = 0; $i < $length; $i++) {
- $randomString .= $characters[mt_rand(0, $charactersLength - 1)];
- }
- return $randomString;
- }
- if ( isset($_REQUEST["longorshort"]) && $_REQUEST["longorshort"] == "short" ) {$delay = mt_rand (5, 10);}
- else {$delay = mt_rand (40, 55);}
- sleep ($delay);
- echo "<br>Here is a random string:<br>";
- $length = mt_rand (5, 10);
- echo generateRandomString($length);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment