Skip to content

Instantly share code, notes, and snippets.

@asciimo
Created August 26, 2016 21:16
Show Gist options
  • Select an option

  • Save asciimo/65937bf49cd5ba4b13e5598bbbc64803 to your computer and use it in GitHub Desktop.

Select an option

Save asciimo/65937bf49cd5ba4b13e5598bbbc64803 to your computer and use it in GitHub Desktop.
Simulate a slow-loading GIF with a redirect to a PHP script.
# Slow GIF
RewriteRule ^slowfile.gif$ slowfile.php [L]
<?php
$BYTE_LENGTH = 1000;
$DELAY_MS = 10000;
for ($i = 0; $i < $BYTE_LENGTH; $i++) {
echo(chr(rand(32, 126)));
usleep($DELAY_MS);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment