2017 © Pedro Peláez
 

library proxy-checker

PHP (Laravel) Package to check proxy status with all the necessary details

image

sahusoftcom/proxy-checker

PHP (Laravel) Package to check proxy status with all the necessary details

  • Saturday, March 25, 2017
  • by faizahmedfarooqui
  • Repository
  • 9 Watchers
  • 1 Stars
  • 969 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 8 % Grown

The README.md

Service Provider for Proxy Checking (type - http, socks4, socks5) that returns all the necessary information related to each proxy(s) for Laravel PHP Framework [ Packagist ], (*1)

Installation

Type the following command in your project directory, (*2)

composer require sahusoftcom/proxy-checker, (*3)

OR, (*4)

Add the following line to the require section of composer.json:, (*5)

{
    "require": {
        "sahusoftcom/proxy-checker": "dev-master"
    }
}

Setup

In /config/app.php, add the following to providers:, (*6)

SahusoftCom\ProxyChecker\ProxyCheckerServiceProvider::class

How to use

  1. You should use the class SahusoftCom\ProxyChecker\ProxyCheckerService
  2. Pass $url & $config parameter in ProxyCheckerService class, (*7)

        /*
        *   $config [optional]
        */
        $config = [
            'timeout'   => 100,
            'check'     => ['get', 'post', 'cookie', 'referer', 'user_agent'],
            ];
    
        /*
        *   $url [required1]
        */
        $url = "https://www.google.com";
    
        $proxies = [
            'XXX.XXX.XXX.XXX:XXXX,username:password,Socks4',
            'XXX.XXX.XXX.XXX:XXXX,username:password,Socks5',
            'XXX.XXX.XXX.XXX:XXXX'
        ];
    
        $proxyCheckObject = new ProxyCheckerService($url, $config);
        $result = $proxyCheckObject->checkProxies($proxies);
    
        echo "<pre>";
        print_r($result);
        echo "</pre>";
    

    Sample Output

    Array
    (
        [XXX.XXX.XXX.XXX:XXXX,username:password] => Array
            (
                [allowed] => Array
                    (
                    )
    
                [disallowed] => Array
                    (
                        [0] => get
                        [1] => post
                        [2] => cookie
                        [3] => referer
                        [4] => user_agent
                    )
    
                [proxy_level] => 
                [info] => Array
                    (
                        [url] => https://www.google.com/
                        [content_type] => text/html; charset=UTF-8
                        [http_code] => 200
                        [header_size] => 1070
                        [request_size] => 418
                        [filetime] => -1
                        [ssl_verify_result] => 0
                        [redirect_count] => 0
                        [total_time] => 2.055918
                        [namelookup_time] => 0.007662
                        [connect_time] => 0.313878
                        [pretransfer_time] => 1.490388
                        [size_upload] => 0
                        [size_download] => 11431
                        [speed_download] => 5560
                        [speed_upload] => 0
                        [download_content_length] => -1
                        [upload_content_length] => -1
                        [starttransfer_time] => 1.758965
                        [redirect_time] => 0
                        [redirect_url] => 
                        [primary_ip] => XXX.XXX.XXX.XXX
                        [certinfo] => Array
                            (
                            )
    
                        [primary_port] => 8080
                        [local_ip] => XXX.XXX.X.XXX
                        [local_port] => XXXXX
                    )
    
            )
    
    )
    

The Versions

25/03 2017

dev-master

9999999-dev

PHP (Laravel) Package to check proxy status with all the necessary details

  Sources   Download

The Requires

 

by Avatar faizahmedfarooqui

30/12 2016

v0.4

0.4.0.0

PHP (Laravel) Package to check proxy status with all the necessary details

  Sources   Download

The Requires

 

by Avatar faizahmedfarooqui

30/12 2016

v0.3

0.3.0.0

PHP (Laravel) Package to check proxy status with all the necessary details

  Sources   Download

The Requires

 

by Avatar faizahmedfarooqui

30/12 2016

v0.2

0.2.0.0

PHP (Laravel) Package to check proxy status with all the necessary details

  Sources   Download

The Requires

 

by Avatar faizahmedfarooqui

30/12 2016

v0.1

0.1.0.0

PHP (Laravel) Package to check proxy status with all the necessary details

  Sources   Download

The Requires

 

by Avatar faizahmedfarooqui