+6  A: 

Check out PHProxy: http://lifehacker.com/5447726/install-phproxy-in-your-web-space-to-access-blocked-sites

Download: http://sourceforge.net/projects/poxy/

I have actually used this at high school on my site: http://bypass.provanix.com/ and added a login.

Edit:

If you want to try it out, login with username "default" and password "default". I'm still working on the YouTube workaround - it used to work, but the site changed.

Evan Mulawski
An even better script is CGIProxy, which can be found here: http://www.jmarshall.com/tools/cgiproxy/ It contains rewriting logic for almost everything, including JavaScript and Flash. It's written in Perl though.
Emil Vikström
I have edited my post.
Evan Mulawski
A: 
<form><input name=url><input type=submit></form>

Once the form is submitted you'll receive in your php a post variable named "url" where the user has typed the url to surf, the simple way to implement in php is:

echo file_get_contents($_POST['url']);

NB: in order to use file_get_contents properly you should have allow_url_fopen enabled in you php.ini

Bladedu
plz add <form><input name=url><input type=submit></form> add the start. The most basic working proxy!
nerkn
@nerkn: edit submitted; thx :)
Bladedu
This will only act as a proxy for the html. Javascript, images, css will require direct access from the client. Proxies should be rewriting src attributes in the html source code.
webbiedave
A: 

Using squid with a custom url-rewriter (maybe written in PHP) would provide all the required functionality - why start from scratch?

symcbean