Questions tagged [curl-multi]

is refer to multiple synchronous curl transfers

197 questions
3
votes
1 answer

curl_multi_exec: some images downloaded are missing some data / stream incomplete

I have implemented a PHP function which checks & downloads a lot of images (> 1'000) - as passed to it using an array - using the PHP curl_multi_init() method. After reworking this a few times already, because I was getting things like 0 bytes…
Oliver
  • 416
  • 5
  • 14
3
votes
1 answer

Adding values to array from multiple curl requests

I am currently using php-curl-class and I am trying to create an array of urls from JSON responses that match the error code in my code below. My latest try was using array_push which resulted in the urls creating an array of the same urls like…
Richard
  • 445
  • 1
  • 5
  • 21
3
votes
1 answer

How can I send GET data to multiple URLs at the same time using cURL?

My apologies, I've actually asked this question multiple times, but never quite understood the answers. Here is my current code: while($resultSet = mysql_fetch_array($SQL)){ $ch = curl_init($resultSet['url'] . $fullcurl); //load the urls…
Rob
  • 7,980
  • 30
  • 75
  • 115
3
votes
6 answers

curl halts script execution

my script uses curl to upload images to smugsmug site via smugsmug api. i loop through a folder and upload every image in there. but after 3-4 uploads, curl_exec would fail, stopped everything and prevent other images from uploading. $upload_array =…
Funky Dude
  • 3,867
  • 2
  • 23
  • 33
3
votes
0 answers

meaning of curl_multi errno 7 while using proxy

I'm using curl_multi to test a set of proxies, which proved to be working before. My code is working fine, but I get a lot of errno 7 responses, which I find hard to understand: Failed connect to example.com:1; Operation now in progress Failed…
3
votes
2 answers

Identify specific curl multi response

I use curl_multi_exec() to request several websites in parallel. Say, URL1, URL2, and URL3. As soon as one of these websites returns a result, I can process it and then wait for the next response. Now I need to know, based on the response of the…
str
  • 42,689
  • 17
  • 109
  • 127
3
votes
1 answer

Returning http status code from mutiple cURL in PHP

I am trying to return two http status codes from the header information from two parallel cURL requests my script makes. So far my script is as below, the print_r() at the end prints out: Array ( [0] => 200 [1] => ). I'm not sure why it's not…
Ben Paton
  • 1,432
  • 9
  • 35
  • 59
3
votes
2 answers

Parsing response from the WSDL using PHP

I'm very sorry if I made a wrong title, I'm not familiar with SOAP response and types of it. But I guess it's a WSDL response, at least I got it from WSDL link... I have a following url http://somedomain.com/j.svc?wsdl And after I made a request…
Alex F
  • 183
  • 2
  • 14
3
votes
2 answers

AWS S3 batch upload from localhost php error

I am trying to batch/bulk upload from localhost (xampp) to my S3 bucket. It seems to work for about 6 items then i get an error message: The cURL error says Failed sending network data. from http://curl.haxx.se/libcurl/c/libcurl-errors.html Fatal…
t q
  • 4,593
  • 8
  • 56
  • 91
3
votes
1 answer

curl_multi_select always blocking for time out value

When running Example #1 from PHP on Windows XP PHP 5.3.5 the curl_multi_select() line will always block for the duration of the timeout specified (if blank it will block for 1 sec, if I specify 5 sec timeout it will block for 5 sec) regardless of…
pmm
  • 646
  • 9
  • 18
2
votes
1 answer

PHP curl multi on passworded site

I'm currently using the following (old) code to log into a site... public function login() { $url1 = 'https://...'; /* Initial page load to collect initial session cookie data */ $url2 = 'https://...'; /* The page to POST login data to */ …
Isius
  • 6,712
  • 2
  • 22
  • 31
2
votes
1 answer

Handling multiple outbound API calls in a PHP web application

I'm working on a PHP (Zend Framework) web application that, for each user request, makes multiple calls to external APIs (SOAP and/or REST over HTTP). At the moment, the API calls are sequential: Call API A, wait around 1 second for results Call…
fazy
  • 2,095
  • 18
  • 30
2
votes
1 answer

In PHP curl_multi, is there an equivalent to curl_getinfo() to fetch HTTP response codes for curl_multi_exec()?

With curl_getinfo(), you can fetch the response codes for a request: https://www.php.net/manual/en/function.curl-getinfo.php $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE)); There is the function curl_multi_info_read(), but I think it doesn't…
Tristan
  • 1,561
  • 3
  • 18
  • 22
2
votes
0 answers

progress function and CURL multi

I have this code in which I have a list of remote files (for example images) to download using multi curl: $urls = array('http://www.google.com/images/nav_logo82.png', 'http://static.php.net/www.php.net/images/php.gif'); function…
Giuseppe
  • 21
  • 3
2
votes
1 answer

Why does curl_errno() return 0 when there was errors in combination with curl_multi_init()?

I have a list of domains which i want to check if they are active or not. I can check each one separately but I'm having hard time getting the batch to work. $c200= array(); $c301= array(); $c302= array(); $urls=array(); foreach (new…
Faaeq
  • 31
  • 4
1 2
3
13 14