承接 waylaidwanderer/php-rotatingproxymanager 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

waylaidwanderer/php-rotatingproxymanager

最新稳定版本:1.0.3

Composer 安装命令:

composer require waylaidwanderer/php-rotatingproxymanager

包简介

A PHP library you can use to select proxies in a rotation.

README 文档

README

A PHP library you can use to select proxies in a rotation. It uses SQLite to store proxy data so you can use multiple instances of RotatingProxyManager across multiple scripts and it will still work. Requires the SQLite extension for PHP to be installed.

Installation

composer require waylaidwanderer/php-rotatingproxymanager

Usage

// supports proxies in the format "user:pass@ip:port" or simply "ip:port" $list = []; $proxiesFile = './proxies.txt'; $proxies = file($proxiesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach ($proxies as $proxy) { $rotatingProxy = new RotatingProxy($proxy); $rotatingProxy->setWaitInterval(2); $list[] = $rotatingProxy; } $databaseFileLocation = __DIR__; $proxyManager = new RotatingProxyManager($list, $databaseFileLocation); $proxyToUse = $proxyManager->getNextProxy(); var_dump($proxyToUse->getUsername()); var_dump($proxyToUse->getPassword()); var_dump($proxyToUse->getIp()); var_dump($proxyToUse->getPort()); var_dump($proxyToUse->toString()); // will output "user:pass@ip:port" or just "ip:port" 

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04