rapttor / proxy
Proxy list retrieve and provide
Installs: 3 189
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.0
- rapttor/helper: dev-master
This package is auto-updated.
Last update: 2025-04-08 15:27:55 UTC
README
renew proxies:
occasionally, recommended once a hour run loadAll method the list will invalidate once a day, and will get re-loaded.
$p=new \RapTToR\Proxy; $P->loadAll();
run/get a proxy:
get multiple proxies
$proxies = (new \RapTToR\Proxy)->getAll(
array(
"countries"=>array("ca","us),
// one or more criteria below:
// "speed"=>"100", // all lower response than 100ms
// "uptime"=>"90", // all uptime larger than 90%
// "anonimity"=>"anonimous",
// "scheme"=>"socks4",
)
);
later use
$proxy=$proxies(array_rand($proxies));
get one proxy (no parameters required, but can use all of them combines)
$proxy = (new \RapTToR\Proxy)->get(
array(
"country" => "ca"
// "countries"=>array("ca","us),
// "speed"=>"100", // all lower response than 100ms
// "uptime"=>"90", // all uptime larger than 90%
// "anonimity"=>"anonimous",
// "scheme"=>"socks4",
)
);
response:
array(4) { ["scheme"]=> string(6) "socks4" ["ip"]=> string(13) "192.99.201.39" ["port"]=> string(5) "18336" ["country"]=> string(2) "CA" }
todo:
- adding more sources
- keep and validate logs
- optimization
- unit-Testing with PHPUnit [in progress]
changelog
- Sep 29. 2023 : First public release
- Sep 21. 2023 : first draft of the class
links
licence
install
composer require rapttor/proxy
or
"require": {
"rapttor/proxy": "dev-master"
},
"repositories":[
{
"type": "vcs",
"url": "https://github.com/rapttor/proxy.git"
}
]