A PHP script for everyone to put on a local server for speed testing between broadband connections. Optionally saves results into a MySQL database for viewing by an administrator. You can download script here Megaupload.com Size : File size: 3.7 MB http://www.megaupload.com/?d=8T79HEDC Code (markup): Alternative link mirror http://www.easy-share.com/1908636464/speedtest_net_TenThousanddolarGrandscript_.zip Code (markup): Have a nice download all of free and not null so just download and install on your website. Do not forget to say Thanks or give me Good Reputation for your thank you full for this scripts
alternative you can use this scripts Put the following code at the very beginning of your PHP page. <? # Page Load Test Script Share by inrev teamz $load_time = microtime(); $load_time = explode(' ',$load_time); $load_time = $load_time[1] + $load_time[0]; $page_start = $load_time; ?> PHP: Now put the folowing code at the bottom of your page. I suggest you put it just right before the </body></html> TAGS.. <? $load_time = microtime(); $load_time = explode(' ',$load_time); $load_time = $load_time[1] + $load_time[0]; $page_end = $load_time; $final_time = ($page_end - $page_start); $page_load_time = number_format($final_time, 4, '.', ''); echo("Page generated in " . $page_load_time . " seconds"); ?> PHP: That's it. Load you page and you will see a message at the bottom of the page telling you how long it takes for your web page to load. Look at the bottom of you page where it says: Page generated in xx.xx seconds
Shortened version of the second script: echo "Page generated in ". number_format(microtime(true) - $_SERVER['REQUEST_TIME']) ." seconds"; PHP:
Hi, sorry just new to the forum and found this on a Google search Only 3 steps to place new script for php, and please back up your files before you test this new code. On index page in the HEAD place this code <script type="text/javascript"> var d = new Date(); var starttime = d.getTime(); //Get the start time </script> Still on the index page place this code just at the bottom before the BODY tag <script type="text/javascript"> var d2 = new Date(); var endtime = d2.getTime(); //Get the end time //Find the difference between the start and end times var totaltime = (endtime - starttime)/1000; //Round 2 decimal places var result = Math.round(totaltime*100)/100; //Output results to a "P" element document.getElementById("loadtime").innerHTML = "Loading time: "+ result +" sec(s)"; </script> Close and upload the new index page to the server The last piece of code you can place anywhere on the web site on any php page I have done in the hearder <p id="loadtime" >Loading...</p> Upload and your done Can be seen working on Qtellfreeclassifiedads top right Enjoy Michael