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:----Cqrz1o8dvS4VK8eJVmNu3jVkBFS3EPEZpxbVMAHRWuHkDtzczj8TgQiktMHsMf2hQhhhJCpwpHvWLLbdSkZX3qUDO4xVbZgtzOzV9Yk+zsr1vf8NooQMcXP2cw1dlLiy0VoIgj2YXTgTIYJUy5yrZVYqKo7CtrMtkd9W2vZWWl66REcz/Y/Qt8zrrfS2rWTxBmx45cVepuHR4Bn0fb5tz+tbu86wwV++TyGG28LdkJ7kleR1QWJBSqNiTvlUR2RB3pUeOmstPER2yymbf6tbsvNbW0C37l/yH9oEH8mCWOrq1pd+nJRNgpcZAqep51r3iQF+oUhGoUedx/HerTu4cgQ0ey7hjw3Tv6cDHeAr/Uv/7Wzw7MwgORje1tjGHw0F9NZU3qUVEx0jpgzCvtVmeukPF9WVickGGhYI+7AJ/+LG+Zy7tj1I0/B2tm93ZTFpeTcfFKJFfZL1CuNx5veeB/ceVIy7ARsXyz+AJtJJU5Nf8oJwolbI7GOzAKdsquGDGV2w09Er8MGhyOsGIffCLn614naWqjZpp2KhqpKNDd0pzNipi7xdLh7whM8G3e+ZeiPKX6xgo0KF5Gebs3OSMfFTdYIgW+hXJe4WBzXuGxEgI4wE0lAK8J0cXJJF/CQXJrQBmqeRo6T57DkAc5lU1XsGZn222Bib0gnDm3RYkJo=----ATTACHMENT:----MjMwNDQxNzQ3NjExNjc1MiA5NDkwNzQ5OTEzOTYxODA1IDM2OTg5NjE1NTM3ODIxNzg=