file_get_contents 和 curl 效率问题

经过测试:首先 curl 抓取速度快

这是别人做过的关于curl和file_get_contents的测试:

file_get_contents抓取google.com需用秒数:

2.31319094
2.30374217
2.21512604
3.30553889
2.30124092

curl使用的时间:

0.68719101
0.64675593
0.64326
0.81983113
0.63956594

这几天又被坑了一次

发现 file_get_content 有缓存

记录我编程生涯中的点点滴滴
原文地址:https://www.cnblogs.com/jiutong/p/3512276.html