on-org/onlineproxy-api
最新稳定版本:1.0.1
Composer 安装命令:
composer require on-org/onlineproxy-api
包简介
php onlineproxy api client
关键字:
README 文档
README
A PHP wrapper for managing proxies from OnlineProxy.io.
🌟 Features
- 🌐 Proxy Management: Easily manage proxies from OnlineProxy.io in your PHP projects.
- 🛠️ Simple Integration: Straightforward setup and usage with clear, concise methods.
- 📚 Comprehensive API Support: Access to a wide range of API functionalities, including managing proxies, fetching user balance, and ordering proxies.
- 🐞 Bug Reporting: Quickly report issues through GitHub.
✨ Introduction
OnlineProxy PHP API simplifies the integration of proxy management services into PHP applications. Its intuitive methods and straightforward design allow developers to focus on building applications without worrying about low-level HTTP integrations.
⚙️ Installation
To use the library in your PHP project, simply include the classes manually or through a PSR-4 autoloader (e.g., Composer):
composer require on-org/onlineproxy-php-api
🗂 Quick Setup
Initialize the API Client
require 'vendor/autoload.php'; use onOrg\OnlineProxyApi\OnlineProxyApi; $apiKey = 'your_api_key_here'; $locale = 'en'; // 'en', 'ru', or null for default $devId = null; // Optional developer ID $client = new OnlineProxyApi($apiKey, $locale, $devId);
🛠️ Methods
🌍 getProxyList
$proxies = $client->getProxyList(); print_r($proxies);
🌐 getProxy
- Description: Retrieves details about a specific proxy by its ID.
- Documentation: [ru] [en].
- Parameters:
id(string): The ID of the proxy.
- Example:
$proxyId = 'proxy_id_here'; $proxy = $client->getProxy($proxyId); print_r($proxy);
💰 getUserBalance
$balance = $client->getUserBalance(); print_r($balance);
🔄 rotateProxy
$rotationResult = $client->rotateProxy(); print_r($rotationResult);
💬 createOrUpdateProxyComment
- Description: Adds or updates a comment for a specific proxy.
- Documentation: [ru] [en].
- Parameters:
id(string): The ID of the proxy.comment(string): The comment to add or update.
- Example:
$proxyId = 'proxy_id_here'; $comment = 'New comment'; $result = $client->createOrUpdateProxyComment($proxyId, $comment); print_r($result);
📋 getAvailableProxiesForOrder
$availableProxies = $client->getAvailableProxiesForOrder(); print_r($availableProxies);
🛒 orderProxy
- Description: Orders a new proxy.
- Documentation: [ru] [en].
- Parameters:
orderData(array): An array of order details.
- Example:
$orderData = [ 'proxyType' => 'HTTP', 'quantity' => 1, 'location' => 'USA', ]; $orderResult = $client->orderProxy($orderData); print_r($orderResult);
📊 getProxyTariffs
$tariffs = $client->getProxyTariffs(); print_r($tariffs);
📚 Additional Resources
- OnlineProxy.io: Official website for managing proxies.
- GitHub Repository: View the source code and contribute to the project.
- Documentation: Comprehensive API documentation.
🐞 Reporting Issues
If you encounter any issues or have suggestions for improvements, please create an issue on our GitHub repository.
Happy coding with OnlineProxy PHP API!
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-29