php – Make request via FTP and return the file via HTTP

I am developing a blog and I would like to use resources from another server through FTP. To share some of these files in my posts I figured that it would be possible to connect FTP within PHP and return the desired file to the user, without needing to copy to my blog's PHP server. That's where the questions come from: PHP would need to download the entire file before returning it? What method should the nicolab / php-ftp-client library use to achieve this effect?

A more or less example of what I think it would be:

Path: get (& # 39; files / {id_artigo} / {file} & # 39 ;, & # 39; FTPController @ captureFile & # 39;);

And within the method, that would be the interesting part, but I do not know how to proceed:

$ ftp = FTPClient ();
$ Ftp-> connect ($ host);
$ ftp-> login ($ user, $ passwd);
// Below the dummyMethod () should
// collect the file and store in $ file
// NOTE: $ name is the file name
$ file = $ ftp-> dummyMethod ($ name);
return $ file;