Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tips How to get Page Loading Time using PHP
#1
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.';
?>
To Purchase Credit Click here , For how to make money on Sologet forum Click here 

HIRE ME FOR WEBSITE DESIGNING USE THE PM BUTTON TO SEND ME MESSAGE

There is love in sharing
  


Messages In This Thread
How to get Page Loading Time using PHP - by Kingsolomon - 09-29-2018, 06:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TIPS How to add one day in current date using php Kingsolomon 1 850 04-14-2020, 01:16 AM
Last Post: Shugudun
  How to session timeout warning with countdown using PHP, Ajax and HTML Kingsolomon 1 848 04-14-2020, 01:10 AM
Last Post: Shugudun
  How to read more / hide text using Jquery and PHP Kingsolomon 1 868 04-14-2020, 12:57 AM
Last Post: Shugudun
  How to limit text length in php and provide 'Read more' link Kingsolomon 1 1,058 04-14-2020, 12:43 AM
Last Post: Shugudun
  How to Stop Sending E-Mail Spam using PHP mail function Kingsolomon 2 1,223 04-14-2020, 12:40 AM
Last Post: Shugudun

Forum Jump:


Users browsing this thread:
1 Guest(s)

How to get Page Loading Time using PHP00