PHPackages                             jamshidian9898/php-proxy - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. jamshidian9898/php-proxy

ActiveLibrary[HTTP &amp; Networking](/categories/http)

jamshidian9898/php-proxy
========================

v0.2.0(2y ago)012MITPHP

Since May 28Pushed 2y agoCompare

[ Source](https://github.com/jamshidian9898/php-proxy)[ Packagist](https://packagist.org/packages/jamshidian9898/php-proxy)[ RSS](/packages/jamshidian9898-php-proxy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

[![](https://camo.githubusercontent.com/a6d1c8ee69f615850cea3599f69e17e4ff65990bcb723eb2fe9757ac1ccb4e9d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6a616d7368696469616e393839382f7068702d70726f7879)](https://camo.githubusercontent.com/a6d1c8ee69f615850cea3599f69e17e4ff65990bcb723eb2fe9757ac1ccb4e9d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6a616d7368696469616e393839382f7068702d70726f7879)

php-proxy
=========

[](#php-proxy)

Proxy script built on PHP, Symfony and cURL. This library borrows ideas from Glype, Jenssegers proxy, and Guzzle.

PHP-Proxy Web Application
-------------------------

[](#php-proxy-web-application)

If you're looking for a **project** version of this script that functions as a Web Application similar to Glype, then visit [**php-proxy-app**](https://github.com/jamshidian9898/php-proxy-app)

See this php-proxy in action: [UnblockVideos.com](https://unblockvideos.com/)

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

[](#installation)

Install it using [Composer](http://getcomposer.org):

```
composer require jamshidian9898/php-proxy
```

Example
-------

[](#example)

```
require('vendor/autoload.php');

use Proxy\Http\Request;
use Proxy\Proxy;

$request = Request::createFromGlobals();

$proxy = new Proxy();

$proxy->getEventDispatcher()->addListener('request.before_send', function($event){

	$event['request']->headers->set('X-Forwarded-For', 'php-proxy');

});

$proxy->getEventDispatcher()->addListener('request.sent', function($event){

	if($event['response']->getStatusCode() != 200){
		die("Bad status code!");
	}

});

$proxy->getEventDispatcher()->addListener('request.complete', function($event){

	$content = $event['response']->getContent();
	$content .= '';

	$event['response']->setContent($content);

});

$response = $proxy->forward($request, "http://www.yahoo.com");

// send the response back to the client
$response->send();
```

Plugin Example
--------------

[](#plugin-example)

```
namespace Proxy\Plugin;

use Proxy\Plugin\AbstractPlugin;
use Proxy\Event\ProxyEvent;

use Proxy\Html;

class MultiSiteMatchPlugin extends AbstractPlugin {

	// Matches multiple domain names (abc.com, abc.de, abc.pl) using regex (you MUST use / character)
	protected $url_pattern = '/^abc\.(com|de|pl)$/is';
	// Matches a single domain name
	//protected $url_pattern = 'abc.com';

	public function onCompleted(ProxyEvent $event){

		$response = $event['response'];

		$html = $response->getContent();

		// do your stuff here...

		$response->setContent($html);
	}
}
```

Notice that you must use the **/** character for regexes on `$url_pattern`

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

1082d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee9cbf106bdd8dc23b1800e296897776c6f461fca66df0706da8ed67e33fa70e?d=identicon)[jamshidian9898](/maintainers/jamshidian9898)

---

Top Contributors

[![Athlon1600](https://avatars.githubusercontent.com/u/1063088?v=4)](https://github.com/Athlon1600 "Athlon1600 (162 commits)")[![panjiwiramanik](https://avatars.githubusercontent.com/u/36139351?v=4)](https://github.com/panjiwiramanik "panjiwiramanik (16 commits)")[![webaddicto](https://avatars.githubusercontent.com/u/8770136?v=4)](https://github.com/webaddicto "webaddicto (8 commits)")[![jamshidian9898](https://avatars.githubusercontent.com/u/82059613?v=4)](https://github.com/jamshidian9898 "jamshidian9898 (3 commits)")[![diffen](https://avatars.githubusercontent.com/u/884719?v=4)](https://github.com/diffen "diffen (3 commits)")[![Eliastik](https://avatars.githubusercontent.com/u/26941242?v=4)](https://github.com/Eliastik "Eliastik (2 commits)")[![achasseux](https://avatars.githubusercontent.com/u/3685300?v=4)](https://github.com/achasseux "achasseux (1 commits)")[![khavishbhundoo](https://avatars.githubusercontent.com/u/18513761?v=4)](https://github.com/khavishbhundoo "khavishbhundoo (1 commits)")[![miicha](https://avatars.githubusercontent.com/u/3731697?v=4)](https://github.com/miicha "miicha (1 commits)")[![arabcoders](https://avatars.githubusercontent.com/u/1621552?v=4)](https://github.com/arabcoders "arabcoders (1 commits)")

---

Tags

web proxyphp proxyphp web proxyproxy scriptphp proxy script

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jamshidian9898-php-proxy/health.svg)

```
[![Health](https://phpackages.com/badges/jamshidian9898-php-proxy/health.svg)](https://phpackages.com/packages/jamshidian9898-php-proxy)
```

###  Alternatives

[athlon1600/php-proxy

308121.4k4](/packages/athlon1600-php-proxy)[athlon1600/php-proxy-app

Web proxy application project powered by PHP-Proxy library

86615.5k](/packages/athlon1600-php-proxy-app)[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
