a href="xn--fiqr16adi7bgnc.xn--dqr445bdw4a.xn--j6w193g">隆鎮,Hacker News,Network Security,Hacker News,1N4148
Demonstraton of PHP Reverse Proxy - PHP Class,PHP Class

Demonstraton of PHP Reverse Proxy

Before using the PHP Reverse Proxy, please be reminded that you should set your web server to handle the "File Not Found HTTP 404" by specific file.  If you don't know how to achieve this, you can go back and scroll down to the references session.  I have written some articles in describing the steps of that.
 
Now, assuming that you have set your web server to execute a file called "404.php" whenever no corresponding file can be found.  If your private site is http://cloudgen.brinkster.net and you want to publish it as http://debug.buss.hk The following steps should help you for setting up the Reverse Proxy server.
 
  1. Download the PHP Reverse Proxy and save it to /inc/php-reverse-proxy.php under the document root of the web server in http://debug.buss.hk ,
  2. create an empty 404.php file and
  3. create an empty index.php file in the same server,
  4. Store the following code in BOTH of the files (and files if you need for handling POST request):
<?
include($_SERVER['DOCUMENT_ROOT']."/inc/php-reverse-proxy.php");
$proxy=new PhpReverseProxy();
$proxy->port="";
$proxy->host="cloudgen.brinkster.net";
$proxy->forward_path="";
$proxy->connect();
$proxy->output();
?>
Now you can try browsing your server (e.g. invoke http://debug.buss.hk/form.asp in your web browser, which is now a reverse proxy server for  http://cloudgen.brinkster.net/form.asp