1. Go to this page and download the library: Download arntech/guzzle-pool-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
arntech / guzzle-pool-client example snippets
$pool = new DynamicPool(100);// where 100 is the pool size
$pool = new DynamicPool(100);// where 100 is the pool size
$client = new DynamicPoolClient(['pool'=>$pool]);
//or
$client = new DynamicPoolClient(['pool_size'=>100]);// where 100 is the pool size
//or use uniqe calls for each request
$client = new DynamicUniquePoolClient(['pool_size'=>100]);
$client->add($promise, 'key');
private function runGet($url)
{
$this->client->add($this->client->getAsync($url), $url);
}
$this->client = new DynamicUniquePoolClient(['pool_size'=>10]);
$this->runGet('http://first.url');
$this->runGet('http://second.url');
$this->runGet('http://first.url'); //this will be canceled
$this->client->wait();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.