README.md

December 4, 2022 · View on GitHub

Page Load Time

Description

This small script will let you output how much time (in seconds) it took for the page to expell. i.e. 0.501 seconds

More Info

Submitted On
BySteve Gricci
LevelBeginner
User Rating4.6 (87 globes from 19 users)
CompatibilityPHP 3.0, PHP 4.0
CategoryMiscellaneous
WorldPHP
Archive File

Source Code

/*
*@author steve gricci rejuvenx@deepcode.net
*@access public
*@skill beginner
*@site www.deepcode.net
*/

//put at begining of file

function utime (){
time=explode("",microtime());<br>time = explode( " ", microtime());<br> usec = (double)time[0];<br>time[0];<br> sec = (double)time[1];<br>returntime[1];<br> return sec + usec;<br> }<br> start = utime();

//put at end of page before /body and /html tags

end=utime();end = utime(); run = endend - start; echo "Page expelled in " . substr($run, 0, 5) . " secs.";
//Nothing after this