phpcurlpage-load-time

Using Curl for load time testing PHP


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);

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.