Page Loading Time in PHP

Dec 17, 2004

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.