PHPackages                             arhx/proxy-checker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. arhx/proxy-checker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

arhx/proxy-checker
==================

PHP Package to check proxy status with all the necessary details

1.1.0(6y ago)19PHPPHP &gt;=5.5.9

Since Jun 13Pushed 6y agoCompare

[ Source](https://github.com/arhx/proxy-checker)[ Packagist](https://packagist.org/packages/arhx/proxy-checker)[ RSS](/packages/arhx-proxy-checker/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Arhx ProxyChecker
=================

[](#arhx-proxychecker)

Service for Proxy Checking that returns all the necessary information related to each proxy(s)

Installation
------------

[](#installation)

Type the following command in your project directory

`composer require arhx/proxy-checker`

How to use
----------

[](#how-to-use)

1. You should use the class `Arhx\ProxyChecker\ProxyChecker`
2. Pass `$url` &amp; `$config` parameter in `ProxyChecker` class

```
/*
*	$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
-------------

[](#sample-output)

```
Array
(
   [allowed] => Array
       (
           [0] => get
           [1] => post
           [2] => cookie
           [3] => referer
           [4] => user_agent
       )

   [disallowed] => Array
       (
       )

   [proxy_level] => elite
)

```

Check page example
------------------

[](#check-page-example)

```
