-
-
Save hatzopoulos/81ed7eedb1dc6a7a9ace to your computer and use it in GitHub Desktop.
fftb.php
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
<?php | |
// Set content type and disable encoding | |
header('Content-Type: text/html; charset=UTF-8'); | |
while (@ob_get_level()) ob_end_flush(); | |
ob_start(); | |
// Send some content | |
function padding () { | |
echo '<!-- ' . str_repeat(' ', 1024 * 64) . ' -->'; | |
} | |
// Flush content | |
function flushit () { | |
@ob_flush(); | |
flush(); | |
} | |
// Flush content and delay | |
function delay ($seconds = 0.25) { | |
padding(); | |
flushit(); | |
usleep($seconds * 1000000); | |
} | |
?><!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="utf-8"> | |
<title>First time to byte</title> | |
</head> | |
<body> | |
<?php padding(); ?> | |
<?php flushit(); ?> | |
<div id="page"> | |
<div id="header"> | |
<div id="logo"> | |
<img src="http://cdn4.rewstatic.com/img/rewLogoSized.png" width="149" height="38" alt=""> | |
</div> | |
<?php padding(); ?> | |
<?php flushit(); ?> | |
<ul> | |
<li><a href="?">Home</a></li> | |
<li><a href="?about">About</a></li> | |
<li><a href="?contact">Contact</a></li> | |
</ul> | |
<?php padding(); ?> | |
<?php flushit(); ?> | |
</div> | |
<div id="content"> | |
<?php | |
// Count to 50.... | |
for ($i = 1; $i <= 50; $i++) { | |
echo $i . "\n"; | |
delay(); | |
} | |
?> | |
</div> | |
<div id="footer"> | |
<p>© <?=date('Y'); ?></p> | |
<p><a href="http://www.realestatewebmasters.com/" target="_blank">Real Estate Webmasters</a></p> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment