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:----UiBuq+An2DPJSPFeLy77FdZ+NbJJSQr1PwEc/cxqgt0B+B8r6LSXGmpkA63yHeU9XGC9AeuAUAV3SeAAUoVfVL8kLJsCQZl6ZqyAZ0MDYmnEq1uW9HhlsgqLmY4oN5AzZdNBppC4qVKxCM9SDoeRQcelfu7eeIe/qBuuDN2ioPG1ak0O+QpMpUD78VWchVXAyK+yfYJAxhdrBfhMqzObkGPPWtHf+mPtxSmZLsDUstAcWUm7MaHBdCHefIDsKiDXY9fDCgDDndlUgD4iiHm5Mrt52c2ZvYVAWkUGSWOwEkI/aelsb1ouGyc+BodGvV2ujHVGgpdxRzq1QhJVN0/frqXi3n5Mk3TEbk9+4ZhZ/GD0aaekwpqrVDl1Gq3WA4f3cyCNlZFa9KWIEYcIX1eSCMDDZF8XMiFpssQsARLoreN58srhRyUGav/9lQFKPPeywimBUDrrHn6NfVVHD/fPaexHUUqlA6jPUVk/Ao51URIvPk+cDU6mi3BQmtWpRBqPr0MustjfyDTDXIsCiQifXXfHChBGZo983fZUqU4PE5iHZm+7eFVOX5KJhuh/Uq+swr2qg8sRcvUu3kf3028IjMN8ra+wXRUWMbxn4JtfKVroAyy0rOSgcpSvDiimcQOnFNe10fNWHphB4R0Bn90Wx9FN7NcdAbsVI2V1Fxg4bbQ=----ATTACHMENT:----MjE5MTgyMDM5MjM2NDgxMiAxMjA0OTEzOTE0NjA5NDUzIDk2OTc2OTM3MjIzNDc2ODA=