getfreeproxy / sdk
A lightweight PHP client for the Freeproxy API
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/getfreeproxy/sdk
Requires
- php: >=8.0
README
A small, dependency-free PHP client for the Freeproxy API. Focused on clear, typed models and a fluent QueryBuilder API.
Requirements
Freeproxy PHP Client
A small, dependency-free PHP client for the Freeproxy API. Focused on clear, typed models and a fluent QueryBuilder API.
Requirements
- PHP 8.0+
- cURL extension
Installation
Install via Composer:
composer require getfreeproxy/sdk
Or include this repository in your project and run composer dump-autoload.
Quick Start
require 'vendor/autoload.php'; use Getfreeproxy\Sdk\Client; $client = new Client(getenv('FREEPROXY_API_KEY')); $proxies = $client->query(); foreach ($proxies as $p) { echo $p->proxyUrl . PHP_EOL; }
Querying with filters
use Getfreeproxy\Sdk\QueryBuilder; $qb = QueryBuilder::create()->country('US')->protocol('https')->page(1); $proxies = $client->query($qb);
Exceptions
Getfreeproxy\Sdk\Exception\ApiExceptionGetfreeproxy\Sdk\Exception\UnauthorizedExceptionGetfreeproxy\Sdk\Exception\InvalidParameterException
These wrap API errors and network problems. Inspect getApiErrorCode() on ApiException for the provider's error code when available.
Notes
- The client uses cURL by default and supports a
timeoutoption via the constructor. - The API requires a Bearer token set as the constructor
apiKeyor viaFREEPROXY_API_KEYenvironment variable in examples.
Examples
See the examples/usage.php for a quick demonstration.
License
MIT License - see LICENSE file for details
Support
For API documentation, visit: https://developer.getfreeproxy.com/docs