How to download files from remote ftp to server by laravel

the files given by the customer will be placed on ftp according to a certain format, and then I need to access them according to the rules and store them locally, and then put them on my server. I am generating url to return to ios+ Android model articles. How should this be implemented? I used download to return the file directly to the user, and we want to make it in a form that can be accessed using url? How can such requirements be implemented in laravel5.5? Use this package Laravel-FTP" rel=" nofollow noreferrer "> https://github.com/harishanch., but can"t read the file and ask the boss for help

Mar.16,2021

this can be done directly with Php's own copy:

try{
  if( copy('http://someserver.com/somefile.zip','./somefile.zip') === false ){
    $errors= error_get_last();
    echo $errors['message'];
  }
}catch(Exception $e){
  echo $e->getMessage();
}

https://www.dejanblazeski.com.

perfect solution!

Menu