I am trying to create stream from string and on 2 line I am getting error look like this

> 
> Allowed memory size of 134217728 bytes exhausted (tried to allocate 24379392 bytes)
> 
> 
> 

```
$stream = fopen('php://memory','r+');
fwrite($stream, $response);
rewind($stream);

```

I am trying to get content of the large file from another host, and set in the local

Here is my logic.

```
$url = "https://webdav.abc.ru/abc/20/Storage/Files/c/c51256c25c0cb2610d5018df204b0135.mp4";
$method = "GET";
$headers = [];$body = null;
$response = $this->send(new HTTP\Request($method, $url, $headers, $body));
$stream = fopen('php://memory','r+');
fwrite($stream, $response);
rewind($stream);
$response = $this->parseCurlResult($stream, $this->curlHandle);

```