Questions tagged [curl-multi]

is refer to multiple synchronous curl transfers

197 questions
0
votes
1 answer

why curl_multi_exec in two loops

I saw a piece of example code, i wonder why use two do-while loops? what are difference between the two loops? wait reply online, Thank You~~ do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active…
shinwu
  • 93
  • 1
  • 1
  • 10
0
votes
1 answer

eBay API - cURL_multi only returning last itemID

I try to make a GetItemTransactions call to the eBay API. The call basically works fine, but returns only the last transaction (itemID). I think there is an error in my cURL syntax because I use the same URL ($url) and I would appreciate some help.…
yello
  • 191
  • 1
  • 13
0
votes
1 answer

PHP loop db execute multiple sometimes fails

I am using the following multi curl actions to check the status of various web pages. The function first gets various users and then for each user does a curl multi request checking various web pages. It seems to work okay except that occasionally…
user1098178
  • 697
  • 3
  • 9
  • 25
0
votes
1 answer

php curl_multi_exec() taking longer than time set in CURLOPT_TIMEOUT_MS

I am using curl_multi_exec() to get data from some APIs and using the following code : $startTime = microtime(true); $running = null; do { curl_multi_exec ( $curlMultiHandleResource, $running ); …
0
votes
0 answers

curl_multi_exec() not requesting all

I am trying to use curl_multi_exec() in php with about I am guessing 4000 post calls and getting the return (json). However, After 234 records in my results, my print_r starts showing nothing. I can change the post call url's since each of my URLs…
lingo124
  • 3
  • 1
  • 2
0
votes
1 answer

How to prevent 503 error while using curl_multi

I'm trying to fetch 10 webpages simultaneously. I'm using curl_multi. However i end up with a lot of 503 (too many requests) error on most of the fetched webpages. How can i fix this? Here's the php script that i ran.…
tacoder
  • 15
  • 3
0
votes
0 answers

Saving data from a curl multi init

I am trying to understand how curl multi channel works. Having looked through several locations, including stackoverflow, I now have the following piece of code: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, MY_STREAM_URL); curl_setopt($ch,…
EastsideDev
  • 6,257
  • 9
  • 59
  • 116
0
votes
1 answer

Returning the asynchronous request without blocking

I was able to achieve parallel execution of curl requests using curl_multi. But i'm having issue with the response. Even though the requests are getting executed parallel the response is received only after all the URL's are executed. my requirement…
Anil
  • 89
  • 4
0
votes
2 answers

How to get FTP max connections via cURL in PHP?

I'm working with some FTP-servers with PHP cURL multi handlers to download imagers from they by multiconnections. And I want to know, how many connections supports each server. How can I do this with curl library?
mikatakana
  • 503
  • 9
  • 22
0
votes
1 answer

Get JSON data from many urls via curl_multi

Five hours i try to make this code worked: $url_list = array( 'https://btc-e.com/api/2/btc_usd/ticker', 'https://btc-e.com/api/2/btc_eur/ticker', 'https://btc-e.com/api/2/btc_rur/ticker', 'https://btc-e.com/api/2/ltc_btc/ticker', …
Sir D
  • 2,164
  • 2
  • 17
  • 21
0
votes
1 answer

Error in function 'add_to_curl' when trying to make HTTP-request using curl-multi gem

I'm trying to test 'curl-multi' gem to make http-requests: puts Benchmark.measure { require 'curl-multi' # make multiple GET requests easy_options = {:follow_location => true} multi_options = {:pipeline => true} …
bmalets
  • 3,207
  • 7
  • 35
  • 64
0
votes
1 answer

targeted http request status code only or file size only making sure to put least possible load/traffic on the destination server

if curl --head http://.... includes "301" or "404" then ... if curl --head http://.... has content-Length > 1000000 then ... how to be put the least possible load on the destination server when doing many of such requests? is it possible to only…
iloveregex
  • 57
  • 2
  • 12
0
votes
1 answer

Amazon AWS PHP SDK with Guzzle's MultiCurl?

I need to perform some fairly heavy queries with Amazon's AWS SDK for PHP. The most efficient way would be to use PHP's MultiCurl. It seems that Guzzle already has functionality for MultiCurl built in. Does using the standard methods provided by…
SteveMc
  • 65
  • 1
  • 12
0
votes
2 answers

PHP: http GET/POST in a truly async fashion

Basically, I'm looking for a way to do the following in PHP: http_get_or_post('an.url', 'or.two'); // Do some work here, not worrying about the http going on in the background. $r = wait_for_and_get_the_results_of_the_http_requests() And maybe…
DeducibleSteak
  • 1,398
  • 11
  • 23
0
votes
1 answer

How to minimize memory consumption from PHP Spider when using curl_multi_getcontent()?

I hope someone can help me out with this. I'm currently writing a spider function in PHP that recursively crawls across a website (via links it finds on the site's pages) up until a pre-specified depth. So far my spider works well for up to 2…
Zero Wing
  • 233
  • 2
  • 12