Is there a way to determine how long it takes a web page, and all it's content, to load with PHP?
I have already tried this:
$time_start = microtime(true);
(All the content of the web page here)
$time_end = microtime(true);
$time = $time_end - $time_start;
echo $time;
However, the problem with this (as far as I can tell) is that I'm only calculating the time it takes the php script to execute. This doesn't factor in any images or videos that are on the page.
Is there a way to determine how long it takes a web page to load including images or videos using php?
Basically what I'm trying to do is test the speed of my server with out factoring in my connection speed.