PHP JavaScript Kodu
<!-- Description: A PHP Page Parse timer with java script for a total time to load page
Browsers: IE,FF,Opera (Safari does not support the innerHTML)
Server requirements: Linux/Unix Apache
Additional Information:
Note: the code will time how long it takes to for the PHP code on the page to process then out put the value and add it to the actual page load time in javascript.
All documents that will have PHP code will have to be saved with the .php extention. -->
<?php
$start_time = microtime(true);true);5);'<script language="JavaScript">
<!---
initTime = (new()).getTime();
function pageloadingtime()
{
postTime = (new()).getTime();
seconds = (postTime-initTime)/1000;
document.getElementById("loadTime").innerHTML = "<font color="#00FFCC">(Your Page took " + seconds + " second(s) to load.)</font>";
}
window.onload = pageloadingtime;
//--->
</script>';?>
<!--- PLACE THIS PEICE OF CODE AT THE BOTTOM OF THE PAGE --->
<p><div id="loadTime"></div></p>
echo $javascript;
Date Date
$javascript =
$total = round(($end_time - $start_time),
$end_time = microtime(