PHP code example of softonic / guzzle-proxy-middleware

1. Go to this page and download the library: Download softonic/guzzle-proxy-middleware 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/ */

    

softonic / guzzle-proxy-middleware example snippets


$proxyManager = new ProxyManager(
    new ProxyBonanza(
        new GuzzleClient(),
        $cache, // A PSR-6 item pool cache.
        '<YOUR-USER-PACKAGE-ID>',
        '<YOUR-API-KEY>'
    )
);

$proxyManager = new ProxyManager(
    new SslPrivateProxy(
        new GuzzleClient(),
        $cache, // A PSR-6 item pool cache.
        '<YOUR-API-KEY>'
    )
);

$stack = new HandlerStack();
$stack->setHandler(new CurlHandler());
$stack->push($proxyManager);
$guzzleClient = new GuzzleClient(['handler' => $stack]);