Transfer file to FTP and make it available for download automatically

Asked

Viewed 172 times

1

Good afternoon!

I am developing a website, and I have some questions. On this site will have a page to download some files.

I’d like to do the following:

When transferring a file to the download folder on FTP, that file would have to appear automatically on my download page for users to download.

Does anyone have any idea how I can do that?

Thank you!

  • What technologies are you using? It should be more specific in terms of what you are or want to use.

  • I am using php.

1 answer

0

If you are using PHP one of the possible solutions to solve this problem is to create a folder where you will host all the files for download and place them in the folder via FTP.

After this it will only be necessary to create a script that goes to the folder and reads all the files in that folder and creates links to them as they are added in the folder.

Finally, you only have to generate the interface that makes available the list of documents and their download links.

  • The problem is that I don’t know how to make the script read all the files from the folder.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.