Buax
04-03-2008, 10:35 PM
I would of posted in the correct section but I can't therefore, logically, I thought I should post here. Sorry if I was incorrect in doing this, if a moderator could please move my topic.
I noticed how a lot of websites have stat scripts with hit-counters and such, here is something you can add to them. A page loading time script! This will display how long it took them to load the web page they are on.
First off, you will need to place this right at the top of the page.
<?PHP
$m_time = explode(" ",microtime()); $m_time = $m_time[0] + $m_time[1];
$starttime = $m_time;
?>
This will start a timing script to time how long it too load the web page.
Now this is here it calculates how long it took to load the page, this needs to be as far down as possible on you're page.
<?
$round = 3; // Script by Buax from Habbox Forum
$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 to load.";
?>
I noticed how a lot of websites have stat scripts with hit-counters and such, here is something you can add to them. A page loading time script! This will display how long it took them to load the web page they are on.
First off, you will need to place this right at the top of the page.
<?PHP
$m_time = explode(" ",microtime()); $m_time = $m_time[0] + $m_time[1];
$starttime = $m_time;
?>
This will start a timing script to time how long it too load the web page.
Now this is here it calculates how long it took to load the page, this needs to be as far down as possible on you're page.
<?
$round = 3; // Script by Buax from Habbox Forum
$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 to load.";
?>