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

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

sgmendez/php-proxy
==================

v6.0(8y ago)032.0k↑46.3%MITPHP

Since Jan 11Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (11)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 sgmendez/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

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 93.2% 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 ~128 days

Recently: every ~76 days

Total

10

Last Release

2985d ago

Major Versions

1.0.0 → 3.0.02015-06-07

3.0.0 → 4.0.22016-06-18

4.0.2 → v5.0.12016-12-29

v5.1.1 → v6.02018-03-17

### Community

Maintainers

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

---

Top Contributors

[![Athlon1600](https://avatars.githubusercontent.com/u/1063088?v=4)](https://github.com/Athlon1600 "Athlon1600 (150 commits)")[![webaddicto](https://avatars.githubusercontent.com/u/8770136?v=4)](https://github.com/webaddicto "webaddicto (8 commits)")[![sgmendez](https://avatars.githubusercontent.com/u/464341?v=4)](https://github.com/sgmendez "sgmendez (2 commits)")[![achasseux](https://avatars.githubusercontent.com/u/3685300?v=4)](https://github.com/achasseux "achasseux (1 commits)")

---

Tags

web proxyphp proxyphp web proxyproxy scriptphp proxy script

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/sgmendez-php-proxy/health.svg)](https://phpackages.com/packages/sgmendez-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)[react/http

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

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)

PHPackages © 2026

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