is refer to multiple synchronous curl transfers
Questions tagged [curl-multi]
197 questions
0
votes
0 answers
How can I prevent a large "do while" loop from resulting in a 504 gateway timeout error?
I'm hoping someone can help me here. I'm building a Wordpress plugin that will pull data from an XML feed and store it in a database table. The data includes image, so it is also downloading all of the images into Wordpress's "uploads" folder so…

Graphic Detail
- 101
- 1
- 11
0
votes
1 answer
Php multi curl - get stuff while multi curl is running
I am designing a simple scraping parser with multi curl. I have see many example, but there is a little problem. The parser is waiting of the slowest response and after that is beginning with the parsing.
Is there some cool method to begin with the…

Nik
- 1
0
votes
0 answers
Double CURL with PHP and Multicurl not working like suppose to
enter image description hereTrying to make a double curl in the first curl we are accepting the message by posting the form to the same page. After that we should be posting another curl with the cookies but for some reason the page is not…

BartMolk
- 37
- 6
0
votes
0 answers
PHP curl_multi_exec apache limit?
I have this PHP code:
test-2.php
ini_set('max_execution_time', '900');
ini_set('memory_limit', '2048M');
$start = microtime(true);
$mh = curl_multi_init();
$handles = array();
// create several requests
for ($i = 0; $i < 50; $i++) {
$ch =…

Matei Zoc
- 3,739
- 3
- 16
- 18
0
votes
1 answer
Count how many curl_multi requests have been made
I want to know when each curl request has been made when using curl_multi.
My code so far:
$i = 0;
do {
$status = curl_multi_exec($mh, $running);
if($running){
curl_multi_select($mh);
}
$info = curl_multi_info_read($mh);
…

Ewan Brown
- 143
- 1
- 9
0
votes
0 answers
PHP 7.3 Curl Multi
I'm developing a script in which I use "curl_multi" to handle some requests to APIs faster (?).
Although I have read both by looking on google (maybe I search badly) and in the documentation of the PHP site, I cannot understand if the command:…

Giuseppe
- 531
- 1
- 5
- 19
0
votes
0 answers
How to get results from curl_multi_getcontent as an array instead of string
I run curl_multi_getcontent function to send all api request at once. As a return I get one big array.
Inside this array each url content is being save as string. Can someone please tell me how to change my code so the url content would return as…

user2741313
- 99
- 8
0
votes
1 answer
Asynchronous Request Handling Using Multithreading
I am working on a module which uses 10 queues to handle threads and each of them send curl requests using curl_easy interface (along with Lock) so that; a single connection is maintained till the response is not received. I want to enhance request…

Nabeela Rizvi
- 11
- 2
0
votes
1 answer
How to access PHP multi cURL handle response as soon as it happens
I'm requesting multiple addresses with different response time:
$urlList = [
'https://httpstat.us/200?sleep=3000',
'https://httpstat.us/200?sleep=1000'
];
$mh = curl_multi_init();
$curlHandlerList = [];
foreach ($urlList as $i => $url) {
…

Lukas
- 1,246
- 8
- 15
0
votes
0 answers
curl_multi_fdset returns always 1
What I want to do: download multiple files at the same time.
Issue: curl_multi_fdset always return 1.
Issue 2: I don't really understand how fd_set work. I am new to C and the doc is quite confusing.
Sources: I used this example and this progress…

Simon Pio.
- 115
- 1
- 14
0
votes
1 answer
php curling to a same API numerous times with curl_multi
I have an API that I call about at least 10 times at the same time with different information.
This is the function I am currently using.
$mh = curl_multi_init();
$arr = array();
$rows = array();
while ($row = mysqli_fetch_array($query)) {
…

Seong Min Choo
- 137
- 8
0
votes
1 answer
php curl_multi_thread not working properly
This is the code I am using
function initiate_curl($row, $mh) {
$ch = curl_init();
$url = 'http://openapi.gbis.go.kr/ws/rest/busarrivalservice'; /*URL*/
$queryParams = '?' . urlencode('serviceKey') . "SERVICE API KEY"; /*Service Key*/
…

Seong Min Choo
- 137
- 8
0
votes
0 answers
curl_multi_exec - part of requests return CURLE_COULDNT_RESOLVE_HOST
all!
A have a problem.
My hosting is godaddy
php -v
ea-php-cli Copyright 2017 cPanel, Inc.
PHP 5.6.36 (cli) (built: May 29 2018 01:55:39)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
curl…

Evgheny Tanasov
- 1
- 1
0
votes
0 answers
php How to keep opening new connections and not wait for open connections to close using curl multi?
I am trying to bombard my site using simultaneous 50-100+ curl connections.
i have made list of URLs in array [post IDs are incremental], so no same url will be accessed twice as there is caching enabled on server.
I want to do this purely in…
user1642018
0
votes
1 answer
Is it possible to get the origin URL when using a CURL multi execute in PHP with follow location?
We are making a script where links in our system are checked for invalid statuscodes. For example, someone creates a page on our website, fills it with links, but after many years, some urls are not correct (4xx/5xx status codes).
Do check if a link…

Frank M
- 170
- 3
- 14