PHP code example of getfreeproxy / sdk

1. Go to this page and download the library: Download getfreeproxy/sdk 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/ */

    

getfreeproxy / sdk example snippets




use Getfreeproxy\Sdk\Client;

$client = new Client(getenv('FREEPROXY_API_KEY'));
$proxies = $client->query();
foreach ($proxies as $p) {
    echo $p->proxyUrl . PHP_EOL;
}

use Getfreeproxy\Sdk\QueryBuilder;

$qb = QueryBuilder::create()->country('US')->protocol('https')->page(1);
$proxies = $client->query($qb);