hankknight
asked on
PHP: output very slowly
I want to imitate a very slow server.
How can I make PHP send output very slowly? I want it to send a few bytes then sleep then send a few more bytes.
How can I make PHP send output very slowly? I want it to send a few bytes then sleep then send a few more bytes.
<?php
$image = 'image.png';
header('HTTP/1.1 200 OK', true);
header('Content-Length: ' . filesize($image) , true);
header('Content-Type: image/png', true);
header('Content-Disposition: inline; filename="image1.png"', true);
header('X-Powered-By: XYZ Digital Asset Management', true);
header("Cache-Control: no-cache, must-revalidate", true);
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT", true);
header('Cache-Control: private', true);
readfile($image);
exit;
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.