Questions tagged [curl-multi]

is refer to multiple synchronous curl transfers

197 questions
0
votes
1 answer

php resume ftp upload with curl multi

I can't seem to resume an FTP upload using curl. It always appends the full local file to the partially uploaded remote file, resulting in the remote file being larger then the local file. I am wondering if I have missed an option or if curl_multi…
arbme
  • 4,831
  • 11
  • 44
  • 57
0
votes
0 answers

Curl multi url call methods not working in localhost

I have 3 curl calls to facebook graph API to get data using ajax. For 3 calls it takes too much time to load data, so I tried to use curl multi URL calls methods like curl_multi_init() to call those URLs asynchronously. But look like in my localhost…
dev-m
  • 440
  • 8
  • 24
0
votes
0 answers

Curl_Multi Infinite Loop (10mn)

I have a problem with this function: function multi_activity($nodes,$headers){ $node_count = count($nodes); $results=array(); $curl_arr = array(); $master = curl_multi_init(); for($i = 0; $i < $node_count; $i++) { $url =$nodes[$i]; …
0
votes
1 answer

PHP kill ongoing multi curl requests

Is it possible to kill/stop multi curl requests if one of the requests receives the status code 429? I've been trying to find a solution to this as I pull data from an API and need to avoid going over the rate limit. These requests are asynchronous…
Joel
  • 385
  • 1
  • 4
  • 13
0
votes
1 answer

SImplexml slow or is it WordPress update_meta?

I have a script that uses simplexml_load_string to parse an 658kB XML file. The file is a property (real estate) feed with 118 different properties totalling 21000 lines. The script uses a lot of the following calls to extract the data from…
0
votes
2 answers

Quick logging requests

I'm trying to test my PHP script that creates 48 cURL multi handles, each holding about 1500 requests, all executed in parallel. I'm trying to make sure that all requests are actually sent, and to do so, I'm logging the requests on my server. Here…
LostInTheCode
  • 1,724
  • 2
  • 15
  • 22
0
votes
2 answers

How can I refactor this cURL script to take advantage of PHP's curl_multi function?

I'm using cURL in my PHP app to connect to a RESTful API. However, I just recently discovered that I'm not parallelizing my cURL connections and so performing several successive connection results in extreme latency for the end-user. I've not used…
Josh Smith
  • 14,674
  • 18
  • 72
  • 118
0
votes
1 answer

PHP/CURL/Other - How resource intensive?

I am going to have a daemon that will run on a FreeBSD server, which will exchange small amounts of data with a list of URIs every minute. I am thinking to use the curl_multi functions to run them all at once, or in groups, every minute, using a…
Eli
  • 97,462
  • 20
  • 76
  • 81
0
votes
1 answer

Can I use curl_multi_init on the same api with different parameters?

So I am connecting to the https://genderize.io/ API. I want to scrape from this API as fast as possible because I might need to do 1,000,000 of searches at a time. Is it possible to attach 100,000 (10 names per request) different curl_init headers…
EdTheSped
  • 35
  • 5
0
votes
0 answers

curl_multi appending null value to Json post

I'm sending parallel requests using curl_multi_init, curl_multi_add_handle, curl_multi_exec, curl_multi_select, curl_multi_getcontent, curl_multi_remove_handle and curl_multi_close. The data is perfect when I do the json_encode() but after I send it…
0
votes
2 answers

curl_multi PHP: How to get resource id's of all active easy handles in a master handle

$master = curl_multi_init(); curl_multi_add_handle($master, $somehandle); curl_multi_remove_handle($master, $someotherhandle); curl_multi_exec($master, $running) I know curl_multi_exec($master, $running). $running ==…
Lafix
  • 375
  • 1
  • 3
  • 13
0
votes
1 answer

Is it possible to use curl_multi_getcontent and CURLOPT_WRITEFUNCTION together?

I have an asynchronous curl crawler which works well without CURLOPT_WRITEFUNCTION enabled. I am trying to limit the amount of data downloaded with CURLOPT_WRITEFUCNTION by stopping any downloads that go over 1mb in size. The problem I am having is…
darkAsPitch
  • 1,855
  • 4
  • 23
  • 35
0
votes
1 answer

cURL with multi interface for many connections with proxy

I need to check many proxies from list against one website. I decided to use libcurl to do this. I used this example and modified it according to my needs. Here is my code: #include #include #include #include…
0
votes
0 answers

PHP Curl curl_multi_exec hangs

I need to check some proxies for web site, so I use Curl multi interface to do it simultaneously. Using existing examples and hints I wrote this code: public function process(){ // *** Multi handle initialized and easy handles added …
0
votes
0 answers

Web application is suspended (hanging up) while php curl_multi_exec is running

What's wrong? php, mysql, apache under MAMP: All works good! but while this script is executing (even just with 1-3 links) whole page requests of current site are suspended (frozen). When multi curl is finished, whole frozen page requests load…
LINKeRxUA
  • 559
  • 6
  • 26