Write transparent HTTP Proxy script in PHP

Posted by Leo Izen on Stack Overflow See other posts from Stack Overflow or by Leo Izen
Published on 2011-01-16T22:48:39Z Indexed on 2011/01/16 22:53 UTC
Read the original article Hit count: 149

Filed under:
|
|
|
|

Is there an easy forwarding/transparent php proxy script that I can host on my web server? These are my conditions:

  1. I'm using free web hosting, so I have pretty much no control over my machine. Otherwise I could use Perl's HTTP::Proxy module. This means no root password. It does run php though.

  2. I already have a server running on port 80. What I mean is I would like to put a php script as index.php on my server that will forward all requests.

  3. I don't want a script like PHProxy or Glype where I go to the site, then enter a URL. I want a server so I can enter proxy.example.com:80 in Firefox's or IE's or whatever's proxy settings and it will forward all requests to the server.

  4. Preferably (though not fatal if not possible) I would like for it to pass on the USER_AGENT environmental variable (That's the browser) instead of setting itself to be the USER_AGENT

  5. I can't start a new Daemon. My server won't allow it.

Is there a script that will do this? If so, which?

© Stack Overflow or respective owner

Related posts about php

Related posts about http