How to make Web Performance Analyzer like https://gtmetrix.com/

Viewed 23

I want to make a Website Performance analysis like https://gtmetrix.com/ option on my website. Can anyone help with this?

Only I have loading time measuring for own website. I want to develop this to measure any website loading time

enter code here 
<?php
function getTime()
{
 return array_sum(explode(" ",microtime()));   
}
$startTime = getTime();
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Page Load time in PHP">
    <title>Page Load Time PHP - PhpCluster</title>
    </head>
    <body>
    <h1>Page Load Time in PHP</h1>
     <p>This is sample paragraph</p>
    <?php 
    // All your code
    for ($i=0; $i< 10000000; $i++){
    }
    ?>
 </body>
 </html>
    <?php
    $endTime = getTime();
    $timeTaken = round(($endTime - $startTime),2);
    echo "Page loaded in $timeTaken seconds";
    ?>
0 Answers
Related