is refer to multiple synchronous curl transfers
Questions tagged [curl-multi]
197 questions
1
vote
0 answers
curl_multi_init with different proxy for each handle?
i want to write a script using curl_multi_init() but i must have to specify the curl_setopt() with my proxy only once and not for each handle, there is a way to solve this with different proxy for each handle?
i got the solution, specify the proxy…

Ben
- 249
- 5
- 19
1
vote
1 answer
Optimize php multi curl in large traffic 100 req/sec
I have around 100 res/sec and then every single request is forwarded to 10 different urls. I am using curl_multi_exec to post my json to the urls and then receive response from each of them and manipulate it according to my needs. The problem is…

nik1999
- 32
- 5
1
vote
1 answer
How to synchronize multiple curl_multi request in php?
i want to use curl_multi to perform some asynchronous requisitions, but i want to make a group of requisitions at the time, because when the response of the requisitions fullfills my needs i intend to stop the all the request. Here is my…

Alessandro
- 85
- 1
- 8
1
vote
1 answer
PHP Multi-cURL requests delayed until timeout
Summary
I have some PHP 5.4 code which fetches a batch of Facebook/Instagram photos in parallel using multi curl. This code has been working for years, and nothing has changed as far as I can tell.
I add multiple curl requests to a 'multi' request.…

IanS
- 1,459
- 1
- 18
- 23
1
vote
0 answers
Big curl_multi requests or multiple little curl requests (php)
I have to update 106600 data using a REST API but I don't know the most optimized way to do this.
The main difficulty is that the API return data 100 per 100 and I must use offset to have all them all (1066 API calls).
After that, I have to retrieve…

Gotrek
- 71
- 9
1
vote
2 answers
PHP curl_multi_exec runs once
I'm having trouble creating multiple xml requests using php's curl_multi_exec.
The problem is that the do...while loop containing the curl_multi_exec command runs only once and then quits.
Resources…

fjordan
- 13
- 1
- 4
1
vote
0 answers
foreach loop with curl multi exec
I am Trying to find out how to send multiple curl requests with help of curl multi exec inside foreach loop. I wrote some of code, But it is not showing me fetch data, I don't understand,
Thanks For Helping out in advance
Here is my Code:

Mysterious
- 11
- 3
1
vote
1 answer
Convert regular CURL request to Multi CURL request
I have the following CURL code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "websiteURL");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch,…
user9544660
1
vote
1 answer
How to have Curl_Multi_Exec return more than 20 good requests without having 500 error code
I'm currently in the process of creating a script that will send a large number of Urls to the Google Pagespeed Insights API (under the specified 100 per user per 100 seconds), process the returned information, and have the scores added to my…

Caffeine_Intensifies
- 13
- 3
1
vote
1 answer
php multi curl multi get request , multi post request
I need to make multiple GET requests to a specific web page which generates a random number and then make multiple POST requests with that specific numbers . So far I have this code :
functions.php
set_time_limit(0);
function multiRequest($data,…

Michael
- 6,377
- 14
- 59
- 91
1
vote
1 answer
Exploding array and adding execution timestamp for each bit of data in the array?
Using curl_multi, I have loaded up 3 url's and then printed the array.
1) How can I also set a timestamp on output to let me know when each url was run?
2) How can I explode the array to only display the data and timestamp, excluding the text "Array…

iCeR
- 77
- 1
- 7
1
vote
1 answer
Is my use of curl_multi() still serial? If so, how can I parallelize?
I got a hint from someone today that my curl_multi() code is actually working in serial, when my hope was to parallelize the cURL requests.
Is my code still serial? If so, how I can parallelize?
Here's the relevant code:
/**
* Returns the cURL…

Josh Smith
- 14,674
- 18
- 72
- 118
1
vote
1 answer
Link-Checking with Multi-Curl
Im building a Link Checker function that checks if the link has code 200/301/302.
I want to check about 1000 links so i I used the Multi-CURL functionality and i do get all the headers, codes, the URL to which a URL redirected.
The Problem is that…

owsata
- 1,105
- 1
- 11
- 24
1
vote
2 answers
PHP - How to check URLS for 404/Timeout?
Here is my structure:
MYSQL: Table: toys ---> Column: id, URL. How do I get my PHP script to check all of those URLs to see if they are alive or have page 404's? Try not to echo or diplay the results on page. I will need to to record in MYSQL with a…

Ray
- 341
- 2
- 6
- 17
1
vote
0 answers
PHP data scraping and multi_cURL number of processes limit
I'm working on a script that will scrape data from another site using cURL and DOMDocument.
I'll post 3 part of code to better explain my script (sorry if it's a big long), but I would check if my logic in building script is correct (I've never…

Alberto Giorgis
- 153
- 12