PHP Classes

Proxy Checker: Check is a HTTP proxy is working

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-06-02 (Yesterday) RSS 2.0 feedNot enough user ratingsTotal: 767 This week: 1All time: 4,396 This week: 257Up
Version License PHP version Categories
proxy-checker 1.0.9BSD License5.2Networking, HTTP, PHP 5


This class can check is a HTTP proxy is working.

It can connect to a given HTTP proxy server and send a HTTP request to a test page of the current site to see if the request is successfully forwarded to the the test page.

If the proxy server returns the expected response, the class analyzes the response to determine if the proxy server is transparent and if omits the origin user details to make the access anonymous.

Picture of Alexey Freelancer
Name: Alexey Freelancer <contact>
Classes: 2 packages by
Country: Ukraine Ukraine
Age: 37
All time rank: 194232 in Ukraine Ukraine
Week rank: 231 Up3 in Ukraine Ukraine Up

# Proxy Checker Check if a proxy is working, its type (transparent, anonymous, elite) and other info (time, http code, redirect count, speed etc.) # Usage ## Proxy format {ip}:{port},{password},{type} type - http, socks4, socks5 <br /> password and type if not required <br /> <br /> Some examples: 123:456:789:8080 123:456:789:8080,user:pass 123:456:789:8080,user:pass,socks5 ## Check one proxy $pingUrl = ''; $proxy = ''; $proxyChecker = new ProxyChecker($pingUrl); $results = $proxyChecker->checkProxy($proxy); ## Check several proxies $pingUrl = ''; $proxies = array('', ''); $proxyChecker = new ProxyChecker($pingUrl); $results = $proxyChecker->checkProxies($proxies); # Result ## Allowed/Disallowed Array allowed/disallowed operations of proxy (get, post, referer, cookie, user_agent), for example: 'allowed' => array ( 0 => 'get', 1 => 'post', 2 => 'referer', 3 => 'user_agent' ) 'disallowed' => array ( 0 => 'cookie' ) ## Proxy level elite - connection looks like a regular client <br /> anonymous - no ip is forworded but target site could still tell it's a proxy <br /> transparent - ip is forworded and target site would be able to tell it's a proxy <br /> 'proxy_level' => 'elite', ## Other info Other proxy info - time, http code, redirect count, speed etc: 'info' => array ( 'content_type' => 'text/html', 'http_code' => 200, 'header_size' => 237, 'request_size' => 351, 'ssl_verify_result' => 0, 'redirect_count' => 0, 'total_time' => 1.212548, 'connect_time' => 0.058647, 'size_upload' => 143, 'size_download' => 485, 'speed_download' => 399, 'speed_upload' => 117, 'download_content_length' => 485, 'upload_content_length' => 143, 'starttransfer_time' => 1.059746, 'redirect_time' => 0, 'certinfo' => array (), ),
  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example script
Accessible without login Plain text file ping.php Aux. Class source
Plain text file ProxyChecker.php Class Class source
Accessible without login Plain text file Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
This week:1
All time:4,396
This week:257Up