Created
December 13, 2010 10:44
-
-
Save drewm/738877 to your computer and use it in GitHub Desktop.
Artificially delay the loading of images to simulate a slow connection
This file contains hidden or 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
<?php | |
/* | |
Artificially delay the loading of images to simulate a slow connection | |
<img src="/slow_image_loader.php?img=realimage.jpg" /> | |
*/ | |
$image = $_GET['img']; | |
// delay between 1 and 3 seconds | |
usleep(rand(1000000,3000000)); | |
header("Location: ".$image); | |
exit; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment