https://github.com/handstandsam/php-guzzle-http-proxy
Simple PHP Proxy for HTTP Requests including GET, POST, PUT and DELETE
https://github.com/handstandsam/php-guzzle-http-proxy
Last synced: about 1 year ago
JSON representation
Simple PHP Proxy for HTTP Requests including GET, POST, PUT and DELETE
- Host: GitHub
- URL: https://github.com/handstandsam/php-guzzle-http-proxy
- Owner: handstandsam
- Created: 2016-03-03T04:34:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-03T04:52:34.000Z (over 10 years ago)
- Last Synced: 2025-04-05T04:32:03.375Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 564 KB
- Stars: 9
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
Proxy for HTTP Requests including GET, POST, PUT and DELETE
Usage: Make a normal request to this php page. The only difference is you'll add an 'X-Proxy-Url' header where the URL you want to hit will go. That's it.
Example (assuming you have this code in a directory named "proxy", running on localhost)
* curl -v 'http://localhost/proxy/' -H 'X-Proxy-Url: https://www.google.com' --compressed
Requires:
* PHP 5.4.0 or later.
Uses Library (included in repository):
* Guzzle 5.3 (HTTP Client) - http://docs.guzzlephp.org/en/5.3/index.html
Attributions:
* Code is a derivative of https://github.com/Svish/php-cross-domain-proxy, but added support for responses that contained the 'Transfer-Encoding: chunked' header. This is done by leveraging the Guzzle client.