{"id":28474230,"url":"https://github.com/athlon1600/php-proxy","last_synced_at":"2025-07-01T10:32:41.293Z","repository":{"id":25398192,"uuid":"28826953","full_name":"Athlon1600/php-proxy","owner":"Athlon1600","description":"A web proxy script written in PHP and built as an alternative to Glype. ","archived":false,"fork":false,"pushed_at":"2023-07-06T16:31:34.000Z","size":533,"stargazers_count":306,"open_issues_count":53,"forks_count":161,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-06-07T13:06:28.316Z","etag":null,"topics":["glype","php-proxy"],"latest_commit_sha":null,"homepage":"https://www.php-proxy.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Athlon1600.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-05T19:03:02.000Z","updated_at":"2025-05-08T13:41:53.000Z","dependencies_parsed_at":"2024-06-18T12:35:09.345Z","dependency_job_id":"59b4e34c-3113-448d-b5a8-bfda9f3016df","html_url":"https://github.com/Athlon1600/php-proxy","commit_stats":{"total_commits":162,"total_committers":8,"mean_commits":20.25,"dds":0.1049382716049383,"last_synced_commit":"9cc42804ddafa079b86b947e4dd83852edddffca"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/Athlon1600/php-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Athlon1600","download_url":"https://codeload.github.com/Athlon1600/php-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262944288,"owners_count":23388728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["glype","php-proxy"],"created_at":"2025-06-07T13:06:28.373Z","updated_at":"2025-07-01T10:32:41.274Z","avatar_url":"https://github.com/Athlon1600.png","language":"PHP","readme":"\u003ccenter\u003e\n\n![](https://img.shields.io/packagist/dm/athlon1600/php-proxy) ![](https://img.shields.io/github/last-commit/athlon1600/php-proxy)\n\n\u003c/center\u003e\n\nphp-proxy\n=========\n\nProxy script built on PHP, Symfony and cURL.\nThis library borrows ideas from Glype, Jenssegers proxy, and Guzzle.\n\nPHP-Proxy Web Application\n-------\n\nIf you're looking for a **project** version of this script that functions as a Web Application similar to Glype, then visit\n[**php-proxy-app**](https://github.com/Athlon1600/php-proxy-app)\n\nSee this php-proxy in action:\n\u003ca href=\"https://proxy.unblockvideos.com/\" target=\"_blank\"\u003eproxy.unblockvideos.com\u003c/a\u003e\n\nInstallation\n-------\n\nInstall it using [Composer](http://getcomposer.org):\n\n```bash\ncomposer require athlon1600/php-proxy\n```\n\nExample\n--------\n\n```php\nrequire('vendor/autoload.php');\n\nuse Proxy\\Http\\Request;\nuse Proxy\\Proxy;\n\n$request = Request::createFromGlobals();\n\n$proxy = new Proxy();\n\n$proxy-\u003egetEventDispatcher()-\u003eaddListener('request.before_send', function($event){\n\n\t$event['request']-\u003eheaders-\u003eset('X-Forwarded-For', 'php-proxy');\n\t\n});\n\n$proxy-\u003egetEventDispatcher()-\u003eaddListener('request.sent', function($event){\n\n\tif($event['response']-\u003egetStatusCode() != 200){\n\t\tdie(\"Bad status code!\");\n\t}\n  \n});\n\n$proxy-\u003egetEventDispatcher()-\u003eaddListener('request.complete', function($event){\n\n\t$content = $event['response']-\u003egetContent();\n\t$content .= '\u003c!-- via php-proxy --\u003e';\n\t\n\t$event['response']-\u003esetContent($content);\n\t\n});\n\n$response = $proxy-\u003eforward($request, \"http://www.yahoo.com\");\n\n// send the response back to the client\n$response-\u003esend();\n\n```\n\nPlugin Example\n--------\n\n```php\nnamespace Proxy\\Plugin;\n\nuse Proxy\\Plugin\\AbstractPlugin;\nuse Proxy\\Event\\ProxyEvent;\n\nuse Proxy\\Html;\n\nclass MultiSiteMatchPlugin extends AbstractPlugin {\n\n\t// Matches multiple domain names (abc.com, abc.de, abc.pl) using regex (you MUST use / character)\n\tprotected $url_pattern = '/^abc\\.(com|de|pl)$/is';\n\t// Matches a single domain name\n\t//protected $url_pattern = 'abc.com';\n\t\n\tpublic function onCompleted(ProxyEvent $event){\n\t\n\t\t$response = $event['response'];\n\t\t\n\t\t$html = $response-\u003egetContent();\n\t\t\n\t\t// do your stuff here...\n\t\t\n\t\t$response-\u003esetContent($html);\n\t}\n}\n```\n\nNotice that you must use the **/** character for regexes on ```$url_pattern```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathlon1600%2Fphp-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathlon1600%2Fphp-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathlon1600%2Fphp-proxy/lists"}