后面附上proxy.php的代码
error_reporting(E_ALL);
/*
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//-------------------------------------------------------------------
// Class: PHProxy
// Author: ultimategamer00 (Abdullah A.)
// Last Modified: 6:28 PM 6/22/2004
*/
function __stripslashes($str)
{
return get_magic_quotes_gpc() ? stripslashes($str) : $str;
}
if (!function_exists('str_rot13'))
{
function str_rot13($str)
{
static $alpha = array('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM');
return strtr($str, $alpha[0], $alpha[1]);
}
}
class PHProxy
{
var $allowed_hosts = array();
var $version;
var $script_url;
var $url;
var $url_segments;
var $flags = array('include_form' => 1, 'remove_scripts' => 1, 'accept_cookies' => 1, 'show_images' => 1, 'show_referer' => 1);
var $socket;
var $content_type;
var $request_headers;
var $post_body;
var $response_headers;
var $response_body;
function PHProxy($flags = 'previous')
{
$this->version = '0.2';
$this->script_url = 'http'
. (isset(
function set_request_headers()
{
$headers = " " . (isset($this->url_segments['query']) ? "?" : '') . " HTTP/1.0rn";
$headers .= "Host: :rn";
$headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)rn";
$headers .= "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1rn";
$headers .= "Connection: closern";
if ($this->flags['show_referer'] == 1)
{
$headers .= "Referer: rn";
}
$cookies = $this->get_cookies();
$headers .= $cookies != '' ? "Cookie: $cookiesrn" : '';
if (
function set_request_headers()









