getfreeproxy/sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

getfreeproxy/sdk

最新稳定版本:1.0.1

Composer 安装命令:

composer require getfreeproxy/sdk

包简介

A lightweight PHP client for the Freeproxy API

README 文档

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\ApiException
  • Getfreeproxy\Sdk\Exception\UnauthorizedException
  • Getfreeproxy\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 timeout option via the constructor.
  • The API requires a Bearer token set as the constructor apiKey or via FREEPROXY_API_KEY environment 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

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-19