Comments (3)
Thank you very much for your help.
Regarding the first question, your examples are written very clearly and are highly applicable. Well done!
As for the second question, I overcomplicated things, and you are right - simply removing the stop()
call will do.
Thank you again for your assistance.
It's a fantastic class.
from php-curl-class.
Hi. For question 1, I've added an example:
https://github.com/php-curl-class/php-curl-class/blob/master/examples/multi_curl_track_success_urls.php
from php-curl-class.
For question 2, calling Curl::stop()
inside the success
callback can be removed.
Without removing the stop()
call as in the example, the addGet()
requests inside the success
callback are queued, but the call to stop()
immediately attempts to stop queued requests and active requests.
With the Curl::stop()
inside the success
callback removed:
$response = [];
$multi_curl ->success(function ($instance) use (&$response, $multi_curl){
$multi_curl->addGet('pending_url_1');
$multi_curl->addGet('pending_url_2');
// more urls to be executed...
});
$multi_curl->addGet('url_1_need_to_be_executed');
$multi_curl->addGet('url_2_need_to_be_executed');
$multi_curl->addGet('url_3_need_to_be_executed');
$multi_curl->start();
from php-curl-class.
Related Issues (20)
- Avoid Error: SSL peer certificate or SSH remote key was not OK (CURLE_SSL_PEER_CERTIFICATE): SSL certificate problem: self signed certificate in certificate chain HOT 3
- multi_curl ,’setCookieString‘ cannot be used HOT 1
- Content-Encoding: gzip issue HOT 1
- Warning gzdecode(): data error after update to 9.12.01 HOT 3
- Base class for Curl and MultiCurl HOT 1
- Deprecated: Creation of dynamic property Curl\Curl::$rfc6265 is deprecated HOT 2
- CurlStringFile: Object of class CURLStringFile could not be converted to string HOT 1
- Having issues with post json or array HOT 1
- Update ci to work with PHPUnit 10 HOT 1
- Fix recently failing CI HOT 1
- Return types HOT 3
- Unsupported protocol (CURLE_UNSUPPORTED_PROTOCOL): Protocol "ftp" not supported or disabled in libcurl HOT 3
- 302 Moved Temporarily HOT 1
- Curl->diagnose(), uncaught type error if Content-Type is null, PHP 8.1.13 HOT 3
- Retry manually HOT 3
- issue with response content being double decoded HOT 5
- Detected an illegal character in input string in /var/www/site/vendor/symfony/polyfill-mbstring/Mbstring.php:536 HOT 2
- Error code: 18 error message: Transferred a partial file (CURLE_PARTIAL_FILE): HTTP/2 stream 1 was not closed cleanly HOT 1
- Curl::afterSend with MultiCurl::addCurl HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-curl-class.