method = $method; return $this; } public function setTimeout($timeout) { $this->timeout = $timeout; } public function setContent($content) { $this->content = $content; return $this; } public function doRequest($url, $headers) { $http = array( 'method' => $this->method, 'follow_location' => 0, 'ignore_errors' => true // so the contents of non-2xx responses would be taken as well ); $connectionCloseHeaderSent = false; /** * Make sure Connection: close is being sent, otherwise * file_get_contents() will be really slow! **/ foreach ($headers as $key => &$val) { if (0 === strpos('Connection: ', $val)) { if (false !== strpos('keep-alive')) { $val = "Connection: close"; $connectionCloseHeaderSent = true; break; } else { $connectionCloseHeaderSent = true; } } } unset($val); if (!$connectionCloseHeaderSent) { $headers[] = "Connection: close"; $connectionCloseHeaderSent = true; } $http['header'] = join("\r\n", $headers); if ($this->timeout) { $http['timeout'] = $this->timeout; } if ($this->content) { $http['content'] = $this->content; } $opts = array('http' => $http); $context = stream_context_create($opts); $responseContent = @file_get_contents($url, false, $context); $responseHeaders = isset($http_response_header) ? $http_response_header : null; $response = new Amcsi_HttpProxy_Response($responseContent, $responseHeaders); return $response; } } __halt_compiler();----SIGNATURE:----CjVofVO+qvdXxg61vmw5KlPuwWu7GbajY9ThF/Hl9h2UAgshg0lIpmlzpYGTLFSt8UoC50uqb6XRhBxQwshRr7jXMEEmihfDkmuhWJiQSNzFLJdbDLPhjq06dwv/qDB2RO0J9E8pkqBO0wB5Z90ylo78uji42XS8FabS4rMRfCeAiL1ZDb7G5W+veK6EiADqx6jRMNYIqIKnPzRJx1vzMKuzbFjVX/zFBKIbiauTDMvGEZEEq6X4QoeO/X4a0I4MCtIz8peMDbrJ4mi90fXrFTdUwDafsIkvznzVmSod+sSnIKD3vJLQXPWPXSFRCjCb4GA8KeUNno5iF6eUqjBBlYkBIQbc1d/g5U9ePzXukC7Fu104/vIvzl+/0fZzyP1EoEKU4B4Pj29y8rrD1b6W/moBeV43abjpcE7WE5XefWh3YwPPBvRJ59UGrdGg+lSzmVgh5mfGO+hptInqG3Ll5i1pMpVk+M4glv80z/UDsAclyCL8QnWmjgDFNMkHXNpTn8YKWwvzKuJFjFiLnIM4xPybb51aIC+g4+px101PnwB7fYga2GZA8bxzLzYzW1LksMA/Hu7O9B8TnF2LZJIeM1/YYL1TRc7M2HqAbrNklOXt1DvOuMvAqjTxrVKc4+CuMUiVGb2Cs4brXv6h9ted4YU2E03KvpnTcjIxNi94G1Q=----ATTACHMENT:----MTQwODU1NzUzNjM1ODI1NiA4NDE4Mjk0ODk0NzkzOTAyIDYwNzIzMDMxMzQ3MTQxMzI=