PHP Proxy versus CGI Proxy

This blog post is proudly sponsored by:
Proxy Builder - Make PHP & CGI Web Proxies

There are only two major free scripts that can be used for proxy sites - PHP Proxy and the other CGI. Both are great in their own way and people use them with equal ease depending upon their needs. However, there are a few basic differences between the PHP Proxy and the CGI Proxy scripts, which are briefly listed below:

Speed – when compared, the CGI Proxy is faster than the PHP Proxy.

Security – this is a very important aspect; the PHP Proxy cannot be configured to accept the SSL support and hence, cannot offer full security for sensitive content; the CGI on the other hand, supports fully the SSL.

Edit: I just read the changelog of phproxy 0.5 beta. There is now SSL support for phpproxy available:
- Added support for connections over SSL (requires PHP >= 4.3.0 and OpenSSL)

Installation – the PHP Proxy is very easy to install. Most of the time all it needs is to download the PHP Proxy, unpack it to the local directory and run it. After you upload it, open the URL and check out to see whether everything works out fine – which in most cases will . The PHP Proxy has the capacity of configuring it in such a manner that it would permit only your clients to connect through your proxy. This can be done by opening the script and adding your client’s IP or by adding an .htaccess file, which will prompt for a password every time somebody accesses your proxy. Be sure you read the instructions carefully so you could comply with the requirements of both the host and your proxy before running it.

CGI Proxy would, on the other hand, require your host to be CGI script enabled for you to be able to run this script. The majorities do not have this facility and hence, you would need to get the feature enabled before you upload it. Once you have it enabled, you could unpack and upload it the same way you would do a PHP Proxy. Once you have that in place, upload the script to your directory and then you are all set to browse the net anonymously. Be aware though, there are other ways to get the correct IP – so do not get cute thinking you are untraceable.

Space – the PHP Proxy need very few server resources and it is easier to upload – though, it will require a much larger bandwidth. The CGI Proxy on the other hand is exactly the opposite – it uses a lot of server’s resources but requires a minuscule amount of bandwidth. Therefore, it depends on you and your requirements which one you will choose in the end.

No matter which of the scripts you would choose, ensure that you avoid some of the most common mistakes people do and sabotage their own success:

Tailoring your script – never use the proxy just as it is; tweak a bit here and there so you can get the best out of it; aim particularly at adjustment which removes pressure from your server.

Domain name – never get stuck with only one domain name; use a minimum of five names – so in case you have one blocked (caught by the host) your sites would be available through another.

Insert text – always have at least one paragraph of text included. Explain a little about your proxy and here you could do well to have the word ‘proxy’ mentioned a few times.

15 Responses to “PHP Proxy versus CGI Proxy”

  1. phproxy is much harder to customize than cgi proxy if you don’t have any previous knowledge of programming languages (other than html/css). With CGI you just copy the form (simplest HTML ever) and then it’s easy to customize - whereas with phproxy, you need to integrate a lot of php here and there.

  2. Hey very informative post to those new with proxies! I also added you to my blogroll now. Please link back: http://www.johnhok.com and with the title as “John Hok”. Thanks!

  3. Thanks for the compliment.

    I’m adding your link to blogroll now! :)

  4. From experience I have found that PHProxy is way faster than cgi proxy :/ Other than that, nice article.

  5. Yes, that is true that PHProxy is faster than cgi proxy.

    The new version of PHProxy is much more improved for faster processing.

  6. …yes right PHPproxy is much faster for surfing while CGIProxy is much easier to use, just create a form and link the proxy script as the target/action and you’re done.

    btw. I don’t understand why do you compare the bandwidth? A visited website of 100kb viewed through a proxy need the same bandwidth.

  7. Thanks for the comments Olaf.

    CGI Proxy is optimized to save bandwith.

  8. Hi Haris,

    strange my (CGI)proxies use much more bandwidth than other people tell (~200gb each)

  9. It depends on what type of websites your users are browsing.

    I think your site is popular and gets around 10k visitors per day?

  10. I think your site is popular and gets around 10k visitors per day?

    not not really arround 1.000 unique visitors and ~ 15.000 pageviews.

    I use a filesize limit for max. 1.5 MB a file to protect my budget ;)

  11. Okay, do you lose returning visitors after or before you implimented 1.5 mb limit?

    Youtube videos are above 1.5 MB

  12. Actually, I lost a lot of visitors (all the people watching porn) lol

    I thought that CGIproxy doesn’t start the Youtube videos…(some flash player update is the problem)

  13. Thanks a bunch for this. My proxy (PHP) was using lots of bandwidth (60+ gigs per day), and this page helped me find optomization links off google. If anyone else wants to know how to save bandwidth:

    At the top of the index, turn on gzip compresson:
    ob_start( ‘ob_gzhandler’ );

    In the config, turn file size to half a meg (prevents downloading movies/big files)
    ‘max_file_size’ => 524288,

    This is saving me tons of bandwidth for my proxy http://unblock.cc

    Thanks again for the blog!

  14. Thanks for sharing the way you use to optimize your proxy site. GZIP takes a lot of server resources.

    Anyways, let us know if you had lost any traffic after implementing restriction to downloading movies/big files.

  15. I think 0.5 mb is a little to small, a better value is ~2mb.

    And I think you tell people that there is limit otherwise the go away because the become mad ;)

Leave a Reply