如何加速CURL任务? [英] How can I speed up CURL tasks?
问题描述
我使用CURL从用户帐户获取一些数据。
首先它登录,然后重定向到数据所在的另一个URL。
I'm using CURL to fetch some data from user accounts. First it logs in and then redirect to another URL where the data resides.
我的统计数据显示,平均需要14秒来获取一些数据超过5页。
我想提高速度,我的问题是:
My stats showed that it took an average of 14 seconds to fetch some data spread over 5 pages. I would like to speed things up, my questions are:
是否可以看到每个步骤需要多少?
你知道我如何加快/提高CURL吗?
Is it possible to see how much each step takes? Do you know how could I speed up/enhance CURL?
谢谢
推荐答案
您可以使用Pete Warden的parallelCurl。来源可在这里 http://github.com/petewarden/ParallelCurl 。该模块允许您在PHP中并行运行多个CURL网址提取
you can use parallelCurl by Pete Warden. The source is available here http://github.com/petewarden/ParallelCurl. The module allows you to run multiple CURL url fetches in parallel in PHP
这篇关于如何加速CURL任务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!