PHP code example of vasilevit / proxy6-api

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

    

vasilevit / proxy6-api example snippets


$api = new \ProxyAPI\Proxy\Proxy6();
$api->setApiKey('api_key');

$proxies = $api->getProxy(\ProxyAPI\Proxy\ProxyState::ACTIVE);
    
$response = $api->buy(1, 7, "ru");
$bought_proxy = $response->list[0];
    
$api->prolong(14, [1, 4, 5]);
    
$response = $api->check($_POST['proxy']);
if ($response->proxy_status) {
    //active proxy
}