Question

Using PHP if I load the URL http://www.cars.com with Curl then use curl_getinfo() to find the total time it takes to load... Will it calculate the load time including all images, and anything else displayed on the page. Or just the HTML (or whatever) file that is located at http://www.cars.com ?

curl_getinfo($ch, CURLINFO_TOTAL_TIME);
Was it helpful?

Solution

If you load a HTML page with cURL, it's just going to load the page itself, not any linked resources like images.

Particularly, it's not going to give you a good idea of how long it would take someone using a Web browser to load the page.

OTHER TIPS

use Apache benchmark if you really want a load test to compensate for ups/downs in cpu usage

No, CURLINFO_TOTAL_TIME will give you the transfer time for the cars.com page. Curl is not a browser and will not load images, javascript etc.

Both Chrome and Firefox (via Firebug) will happily report this for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top