Sologet Forum
TIPS How to get Page Loading Time using PHP - Printable Version

+- Sologet Forum (https://www.sologet.com)
+-- Forum: Programming (https://www.sologet.com/Forum-Programming)
+--- Forum: PHP Programming & Tutorials (https://www.sologet.com/Forum-PHP-Programming-Tutorials)
+--- Thread: TIPS How to get Page Loading Time using PHP (/Thread-Tips-How-to-get-Page-Loading-Time-using-PHP)



How to get Page Loading Time using PHP - Kingsolomon - 09-29-2018

Using microtime() PHP function you will know exactly how much time is needed for your PHP code to be executed. Follow the steps below to put the PHP code on your web page. 
PHP and HTML Code

Code:
<?php
$start_time = microtime(TRUE);
?>
<html>
   <body>
       Your html Code <br />
   </body>
</html>

<?php
$end_time = microtime(TRUE);
$time_taken = ($end_time - $start_time) * 1000;
$time_taken = round($time_taken, 5);
echo 'Page generated in ' . $time_taken . ' seconds.';
?>



RE: How to get Page Loading Time using PHP - kingugo - 10-11-2018

awesomeness


RE: How to get Page Loading Time using PHP - Shugudun - 04-14-2020

Php is so functional

https://jiji.ng/ikeja/computer-and-it-services/php-job-in-an-expert-way-guaranteed-7076057.html?lid=8YsChyGWEzADG4Vs&cur_pos=5&pos=5&ads_count=15&ads_per_page=15&page=1