PHP Classes

PHP Proxy Server: Forward HTTP requests to destination servers

Recommend this page to a friend!
  Info   View files Documentation   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 44%Total: 438 All time: 6,264 This week: 73Up
Version License PHP version Categories
proxy-server 1.1The PHP License5.0Networking, HTTP, PHP 5


This class can forward HTTP requests to destination servers.

It listens to connections on a given TCP port and forwards HTTP requests to final servers and return the responses.

The class uses Guzzle to forward requests to the destination HTTP servers.

The server host and an port that the proxy server lists are configurable.

Innovation Award
PHP Programming Innovation award winner
January 2016

Prize: One downloadable copy of Komodo IDE
HTTP proxy servers are useful to provide anonymity to users or computers that want to access remote Web servers.

This class implements a proxy for HTTP requests using pure PHP code.

Manuel Lemos
Picture of Yousaf Syed
  Performance   Level  
Name: Yousaf Syed <contact>
Classes: 6 packages by
Country: Pakistan Pakistan
Age: 33
All time rank: 232331 in Pakistan Pakistan
Week rank: 286 Up6 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x



Standalone proxy server in PHP sockets, I am using Guzzle to route the requests. Idea was if I can make HTTP Proxy Server in php to get more control over proxy and custom logic. Currently it only supports http requests you can choose port of your own choice plus if you want to make it public or private. This is a standard HTTP Proxy so you can use in browser. By default its only working for localhost, but you can allow public ip's.


  1. ~~Package availble via composer~~
  2. Easy way to integrate custom Logic
  3. Support HTTPs
  4. ~~Parse FormData~~

How To Install?

Define package in your composer.json file as require dependency

   "require": {
        "yousafsyed/standalone_php_proxy": "^v1.0"

Now update/install composer dependencies

   $ composer install
   $ composer update


Create a file server.php

   require "./vendor/autoload.php";
   use YousafSyed\ProxyServer;
   $server = new ProxyServer(); // optional parameters for port and host like this new ProxyServer('8080','localhost')
   // finally run the server

How to Run?

$ php server.php



  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageYousafSyed (1 file)

  Files folder image Files  /  src  /  YousafSyed  
File Role Description
  Plain text file ProxyServer.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,264
This week:73Up
User Ratings User Comments (2)
 All time
very useful it helped me alot with my latest assignment
8 years ago (Syed Usman Ali)
8 years ago (Hassan Raza)