3

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?

1
  • Does your host have cURL support compiled into their php? Commented Jan 16, 2011 at 23:41

1 Answer 1

3

No, I'm fairly sure this is not possible on shared hosting. It will fail your condition number 3. This needs support on web server level (e.g. using Apache's mod_proxy)

For this to work, you would have to set up the remote server to be able to deal with proxied requests. No sane web server will offer that possibility.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 Apache usually tells "Connection attempts using mod_proxy" in its log. I suppose it happens when someone tries to use the server as a proxy. That is, passing absolute URI (which is intended for use with proxies) instead of a path to a resource.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.