What's Here?
- Members: 137,214
- Replies: 481,423
- Topics: 75,054
- Snippets: 2,567
- Tutorials: 675
- Total Online: 2,271
- Members: 112
- Guests: 2,159
|
This simple code will get the microtime (The server's time) and round it to 3 digits. This can obviously be changed, but both values need to be the same. It will then subtract the two times, leaving you with the time it took to generate the page! Remember to place the first part at the start of your document (Preferably before anything but the opening PHP tag) and the final part just above the closing PHP tag ;)
|
Submitted By: iamcenz
|
|
Rating:
  
|
|
Views: 7,866 |
Language: PHP
|
|
Last Modified: February 16, 2005 |
Snippet
// Insert at the start of your document
// Insert at the end of your document
$generation = $time2 - $time;
echo "This page took $generation seconds to render";
Copy & Paste
|
|
|
Reference Sheets
Bye Bye Ads
Monthly Drawing
Top Contributors
Top 10 Kudos This Month
|