Execution of server side scripting need to optimize in order to get the Optimized page loading time. In this case most of the Server Side Response typically not more than 2 to 30 seconds. In this case we need to find the Exact page loading time in PHP using the following Script.
<?php /* Online PHP Examples with Source Code website: http://4evertutorials.blogspot.com/ */ function page_loading_time() { list ($msec, $sec) = explode(' ', microtime()); $microtime = (float)$msec + (float)$sec; return $microtime; } $start=page_loading_time(); usleep(100000); // Delaying page output 0.1 second for testing purpose. echo " "; $end = page_loading_time(); // Print results. echo 'Page Loading Time: ' . round($end - $start, 2) . ' seconds'; ?>
0 comments:
Post a Comment