Not a Member Yet,
Click here to Register
How do you like the new design?






ID: 521
Viewed: 4448
Added: Nov 13, 2003
Version: 1.0
Snippet uploaded by: snippet
Written By: snippet
Demo: Sorry, no demo



User Rated at: 0 Stars
Rate This:

Thank you for your vote. Please wait...

It appears you already voted for this snippet

It appears your vote value was empty

This little script will tell you know how many seconds it took for the page to load or what ever you have it in.

highly configurable and used to determine where and what is causing bottlenecks and slow down in code.

Browsers: all

<!---Head--->
<?php
// need the start time
// this goes at the very beginning of the
// page or script. before it is ran.

$pagestarttime=microtime();
?>

then the start of your page here

<!---Body--->


 <!-- your script / page goes here -- >

<?php
// then at the very bottom of the page
// or script you want to get the end time
$pageendtime=microtime();

$starttime=explode(" ",$pagestarttime);
$endtime=explode(" ",$pageendtime);

$totaltime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];

echo "Page generated in $totaltime seconds";
?>


No Comments to show

Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Replying to a Comment...


Adding your comment. Please wait...

Thanks for adding your comment!. After further review it will be added.

There was a problem adding your comment. Please try again.

Please complete all the fields in the form before sending.

© 2002 - 2017 snippetlibrary.com All Rights Reserved. Conditions