A McGraw Hill Book Plug-in PHP: 100 Power Solutions
By Robin Nixon (McGraw Hill 2010, ISBN 978-0071666596)

Home | About | Buy It | Download | Contact

Select Chapter: 1  2  3  4  5  6  7  8  9 10 11 12

Chapter 7: Plug-in 46 - Simple Web Proxy

There are times when you are unable to browse to a site from one location but you can ping it from a server at another location, so you know the site should be up and running, but your connection to it is probably temporarily blocked. When this happens you can use this plug-in to act as a simple web proxy to browse right through to that site from your web server. Or, if you wish, you can use this code as a basis for your own web proxy service, which could be free or you could even drop in a small advertisement to cover bandwidth costs - although you'd have to add that code yourself.

The Figure shows the news.com website as browsed through to using this plug-in. You can see from the status bar that all URLs in the page have been updated to call up linked pages through the proxy too. And, yes, even the images have been served via the proxy.