is refer to multiple synchronous curl transfers
Questions tagged [curl-multi]
197 questions
5
votes
1 answer
Individual Response Time using PHP curl_multi
It is possible to record the response times of each process using curl_multi? Here's the code I'm currently using I'm just not sure how to record the response times of each process. Thanks for any help!
do
{
$execReturnValue =…

Jim M.
- 53
- 3
5
votes
2 answers
curl_multi_exec stops if one url is 404, how can I change that?
Currently, my cURL multi exec stops if one url it connects to doesn't work, so a few questions:
1: Why does it stop? That doesn't make sense to me.
2: How can I make it continue?
EDIT: Here is my code:
$SQL = mysql_query("SELECT url FROM…

Rob
- 7,980
- 30
- 75
- 115
5
votes
3 answers
Using cURL Handle as Array Key
I'm using curl_multi functions to request multiple URLs and process them as they complete. As one connection completes all I really have is the cURL handle (and associated data) from curl_multi_info_read().
The URLs come from a job queue, and once…

Tim Lytle
- 17,549
- 10
- 60
- 91
5
votes
2 answers
php curl multi error handler
i want to capture curl errors and warnings in my error handler so that they do not get echoed to the user. to prove that all errors have been caught i prepend the $err_start string to the error. currently here is a working (but simplified) snippet…

mulllhausen
- 4,225
- 7
- 49
- 71
5
votes
1 answer
Is curl_multi_exec() a blocking call?
Was just curious if the curl_multi_exec() call in PHP is blocking or non-blocking call.

Adobri
- 471
- 7
- 15
5
votes
2 answers
Why are curl_multi_select and curl_multi_info_read contradicting each other?
When I run the below code it seems to me curl_multi_select and curl_multi_info_read are contradicting each other. As I understand it curl_multi_select is supposed to be blocking until curl_multi_exec has a response but I haven't seen that actually…

hadees
- 1,754
- 2
- 25
- 36
4
votes
1 answer
PHP multi cURL performance worse than sequential file_get_contents
I am writing an interface in which I must launch 4 http requests to get some infomation.
I implemented the interface in 2 ways:
using sequential file_get_contents.
using multi curl.
I have benchmarked the 2 versions with jmeter. The result shows…

Kant
- 41
- 1
- 2
4
votes
1 answer
Optimize PHP algorithm with huge number of threads?
As part of a Laravel based app I am trying to write a PHP script that fetches certain data, that is constantly updated, from across the web about certain products, books to be exact.
The problem:
Books are identified by ISBN, a 10 digit identifier.…

tam5
- 3,197
- 5
- 24
- 45
4
votes
3 answers
Simulating a cookie-enabled browser in PHP
How can I open a web-page and receive its cookies using PHP?
The motivation: I am trying to use feed43 to create an RSS feed from the non-RSS-enabled HighLearn website (remote learning website). I found the web-page that contains the feed contents I…

benzaita
- 12,869
- 3
- 20
- 22
4
votes
0 answers
How to capture curl_errno in curl_multi mode?
For some reason curl_errno($value) always returns 0 instead of 6 when I try url like stkovrflow.com. This is a non existing domain. So curl supposed to return 6. But i'm getting 0.
Can someone tell me what's wrong with my code?
This is how I check…

PrivateUser
- 4,474
- 12
- 61
- 94
3
votes
1 answer
cURL using multiple proxies in a chain
Is it possible to chain multiple proxies in a single request using cURL?
For example:
start cURL -> proxy1 -> proxy2 -> destination address
Can this be achieved using cURL?

Kevin M
- 1,524
- 17
- 38
3
votes
2 answers
PHP Multi curl or multi threading
I'm building a cron job that does the following:
1. Get records from DB
2. For each record fire a curl request to an API. (some requests are quick and some are uploading large images or videos).
3. If a request is not successful, create a new…

Slav
- 353
- 4
- 10
3
votes
1 answer
PHP CURL_Multi checking status of finished handles, removing, adding, timeouts
So I am processing up to about 3000 links, I am using curl_multi to speed up the process. I used a simple process of 20 at a time, wait for all 20 to finish, process 20 more type of method, but I know this is inefficient, especially if one of those…

Serj Sagan
- 28,927
- 17
- 154
- 183
3
votes
1 answer
Speedup php api calls
Hi everyone. So I need to check huge amount of rows in database via API calls. I managed to do that but it is very slow.
Here are steps my code is doing:
1.) I select unique identifiers from my local database.
2.) I check them on remote database…

Kristijan Mikulec
- 164
- 1
- 13
3
votes
2 answers
PHP Codeigniter curl_multi_init error
This is my code:
class facebookConnection {
// Allow multi-threading.
private $_mch = NULL;
private $_properties = array();
function __construct()
{
…

ellieinphilly
- 467
- 1
- 7
- 16