arhx / proxy-checker
PHP Package to check proxy status with all the necessary details
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 3
pkg:composer/arhx/proxy-checker
Requires
- php: >=5.5.9
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2025-10-25 12:31:11 UTC
README
Service for Proxy Checking that returns all the necessary information related to each proxy(s)
Installation
Type the following command in your project directory
composer require arhx/proxy-checker
How to use
- You should use the class
Arhx\ProxyChecker\ProxyChecker - Pass
$url&$configparameter inProxyCheckerclass
/* * $check_page [required] * $config [optional] */ $check_page = 'http://myproxychecker.com/check.php'; $config = [ 'timeout' => 100, 'check' => ['get', 'post', 'cookie', 'referer', 'user_agent'], ]; $checker = new ProxyChecker($check_page, $config); /* * $proxy [required] * &$error_message [optional] * */ $proxy = 'protocol://username:password@hostname:port'; $result = $checker->checkProxy($proxy, $error_message); if($result){ print_r($result); }else{ echo "Error: $error_message\n"; }
Sample Output
Array
(
[allowed] => Array
(
[0] => get
[1] => post
[2] => cookie
[3] => referer
[4] => user_agent
)
[disallowed] => Array
(
)
[proxy_level] => elite
)
Check page example
<?php // possible url for this file: http://myproxychecker.com/check.php include 'vendor/autoload.php'; $checkResult = \Arhx\ProxyChecker\ProxyChecker::checkPage(); $checkResult = implode(PHP_EOL,$checkResult); echo $checkResult;