Have you ever noticed that lots of websites feature a
little "Page loading took x.xxx seconds to load" at the bottom of
their pages? It's a pretty simple thing to make and gives your site something
that we all love... Stats!
Here is what we have to do:
<?
$m_time = explode(" ",microtime());
$m_time = $m_time[0] + $m_time[1];
$starttime = $m_time;
?>
Put at the bottom of your page.
<?
$round = 3;// The number of decimal places to round the micro time to.
$m_time = explode(" ",microtime());
$m_time = $m_time[0] + $m_time[1];
$endtime = $m_time;
$totaltime = ($endtime - $starttime);
echo "Page loading took:". round($totaltime,$round) ." seconds";
?>
That's it. If you have any questions, feel free to post
about it in the guest book and we'll try to help out.