开发者

Multi Curl vs file_get_html from SIMPLEHTMLDOM optimization? slow loading page

I've been learning how to scrape pages using curl multi and simplehtmldom. I originally used regexp to get certain items until I discover开发者_如何学Ced simplehtmldom which took off a whole lot of weight on my coding. PHEW! Anyways, my page loads pretty slow and I'm going to be scraping from multiple pages. I'm scraping from 3 right now and its taking approx. 5 sec to load, maybe a little longer. I was wondering what the best way to optimize my webpage? I am using curl to get a few pages as well as file_get_html from simplehtmldom. Should I just stick with simplehtmldom all the way?

Thanks in advance for your responses!


Solution found by andrewliu: "I figured it out that I can use curl mutli, and now use file_get_html. Thanks for responding though! but for those who want to know, I passed in each array element into a str_get_html(),"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜