Ejemplo n.º 1
0
 public function connect()
 {
     $sendData = $this->serializeParams($this->getParameters());
     $context = stream_context_create(array('http' => array('timeout' => $this->timeout, 'header' => "X-Fw-Transfer: file\r\n")));
     $response = @file_get_contents("{$this->url}?{$sendData}", false, $context);
     if ($response === false) {
         throw TransferException::unknownError();
     }
     if (empty($response)) {
         throw TransferException::emptyDataReturned();
     }
     return $response;
 }