My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

Proxy (noun, /ˈprɒksi/): A process that accepts requests for some service and passes them on to the real server. (source)

I needed to do cross-domain AJAX calls from a jQuery front-end to a PHP backend which was on another domain, and couldn't find a complete, functional proxy script that could bridge both ends... so I created my own. Since both servers had PHP (but the backend needed extra stuff that wasn't on the frontend server), doing a PHP Proxy seemed like the way to go.

What this proxy supports:

  • GET and POST requests (POST was the whole reason for this, since jsonp doesn't support it!)
  • HTTP_REFERER check (only accept requests from one server)
  • COOKIES, in both directions. Technically part of HEADERS, but it's worth mentioning!
  • HEADERS in both directions (with specific exceptions, see Limitations).

What it doesn't support (yet, maybe):

  • Dynamic destination (though that's relatively trivial to change), because I don't need it.
  • Load Balancing/Cycling, I may add this as a personal exercise in the future.
  • Authentication, beyond the referrer check, or session (this should be handled by the backend anyway)
Powered by Google Project Hosting