Page Loading Time in PHP
Learn how to output the time a page takes to load.
Have you every wondered how sites get that “Page loaded in x.xxx seconds.” at the bottom of there pages? It is very simple to do and can be done with any server-side scripting language. I will show you how to do it in PHP.
The script is very simple. First it gets the micro time as the start time. Then at the end it gets the micro time again and finds how many micro seconds have past.
Place this code at the top of your page:
Place this code at the bottom of your page:
July 14th, 2007 at 10:02 pm
this did not work for me. did everything it said. I get “0.00″ seconds as a result.
September 2nd, 2007 at 8:42 am
Heya, It should work just the loading time was too fast try making a complicated page.