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    
Last Updated Ratings Unique User Downloads Download Rankings
2017-07-16 (8 months ago) RSS 2.0 feedStarStarStar 44%Total: 305 This week: 3All time: 7,104 This week: 209Up
Version License PHP version Categories
proxy-server 1.1The PHP License5.0Networking, HTTP, PHP 5
Description Author

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
  Performance   Level  
Name: Yousaf Syed <contact>
Classes: 3 packages by
Country: Pakistan Pakistan
Age: 27
All time rank: 276636 in Pakistan Pakistan
Week rank: 178 Up4 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 1x

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:3
All time:7,104
This week:209Up
User Ratings User Comments (2)
 All time
very useful it helped me alot with my latest assignment
2 years ago (Syed Usman Ali)
2 years ago (Hassan Raza)