PHPackages                             miicha/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. miicha/php-proxy

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

miicha/php-proxy
================

4.0.2(10y ago)011PHP

Since Jan 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/miicha/php-proxy)[ Packagist](https://packagist.org/packages/miicha/php-proxy)[ Docs](https://www.php-proxy.com/)[ RSS](/packages/miicha-php-proxy/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

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/Athlon1600/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 athlon1600/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

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 92.1% 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 ~262 days

Total

3

Last Release

3663d ago

Major Versions

1.0.0 → 3.0.02015-06-07

3.0.0 → 4.0.22016-06-18

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3731697?v=4)[miicha](/maintainers/miicha)[@miicha](https://github.com/miicha)

---

Top Contributors

[![Athlon1600](https://avatars.githubusercontent.com/u/1063088?v=4)](https://github.com/Athlon1600 "Athlon1600 (140 commits)")[![webaddicto](https://avatars.githubusercontent.com/u/8770136?v=4)](https://github.com/webaddicto "webaddicto (7 commits)")[![miicha](https://avatars.githubusercontent.com/u/3731697?v=4)](https://github.com/miicha "miicha (4 commits)")[![achasseux](https://avatars.githubusercontent.com/u/3685300?v=4)](https://github.com/achasseux "achasseux (1 commits)")

---

Tags

web proxyphp proxyphp web proxyproxy script

### Embed Badge

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

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

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k853.6M8.3k](/packages/symfony-http-kernel)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k246.0M11.1k](/packages/symfony-framework-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[athlon1600/php-proxy

309123.7k4](/packages/athlon1600-php-proxy)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k181.3M2.2k](/packages/symfony-security-bundle)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)

PHPackages © 2026

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