PHP code example of clue / connection-manager-extra
1. Go to this page and download the library: Download clue/connection-manager-extra 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/ */
$reject = new ConnectionManagerReject();
$selective = new ConnectionManagerSelective(array(
'ads.example.com' => $reject,
'*:80-81' => $reject,
'*' => $connector
));
// delay connection by 2 seconds
$delayed = new ConnectionManagerDelay($connector, 2.0);
// maximum of 3 tries, each taking no longer than 2.0 seconds
$retry = new ConnectionManagerRepeat(
new ConnectionManagerTimeout($connector, 2.0),
3
);
$selective = new ConnectionManagerSelective(array(
'*:80' => $delayed,
'unreliable.example.com' => $retry,
'*' => $connector
));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.