您的位置首页生活百科

proxy.php什么意思

proxy.php什么意思

PHP 代理陵携脚本 php-proxy  php-proxy 是基于 PHP,Symfony 和 cURL 的代理脚本,这个库借鉴了 Glype,Jenssegers proxy 和 Guzzle 的经验。  示例  require('vendor/autoload.php');  use Proxy\Http\Request;  use Proxy\Proxy;  $request = Request::createFromGlobals();  $proxy = new Proxy();  $proxy->getEventDispatcher()->addListener('request.before_send'尺纤伏竖搜, function($event){$event['request']->headers->set('X-Forwarded-For', 'php-proxy');});  $proxy->getEventDispatcher()->addListener('request.sent', function($event){if($event['response']->getStatusCode() != 200){die("Bad status code!");  }  });  $proxy->getEventDispatcher()->addListener('request.complete', function($event){$content = $event['response']->getContent();$content .= '';  $event['response']->setContent($content);});  $response = $proxy->forward($request, "http://www.yahoo.com");// send the response back to the client  $response->send();  Athlon1600 / php-proxy  Watch17 Star73 Fork36  A web proxy script written in PHP and built as an alternative to Glype. — More...  https://php-proxy.com  Issues  #25 Install in Laravel 5.2 encountered a bug by cynhard 2016-11-28#38 transfer-encoding: chunked misleads browser by h2g-internetagentur 2016-11-14#37 Better content-type check by JClerc 2016-11-08#19 Gmail cookies problem by AoiRei 2016-10-24#40 Google Drive && Dropbox