使用Curl进行加载时间测试PHP [英] Using Curl for load time testing PHP

查看:220
本文介绍了使用Curl进行加载时间测试PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我通过Curl加载URL http://www.cars.com ,则使用PHP,然后使用curl_getinfo ()查找加载所需的总时间...它将计算包含所有图像以及页面上显示的所有其他内容的加载时间.还是仅位于 http://www.cars.com 上的HTML(或其他文件)?

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

推荐答案

如果使用cURL加载HTML页面,那么它将仅加载页面本身,而不是图像之类的任何链接资源.

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

尤其是,它不会让您很好地了解某人使用Web浏览器加载页面需要多长时间.

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.

这篇关于使用Curl进行加载时间测试PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆