protected function doSendRequest($url, array $context)
{
$this->_lastErrorMessage = '';
set_error_handler(array($this, 'errorHandler'));
$response = file_get_contents($url, false, stream_context_create($context));
restore_error_handler();
if (isset($http_response_header)) {
preg_match('#HTTP/\\d+\\.\\d+ (\\d+)#', $http_response_header[0], $matches);
$http_code = $matches[1];
} else {
$http_code = 0;
}
return array($http_code, $response, $this->_lastErrorMessage);
}