Till now, I have been using free service providers to host and share my files. Now, Can I do something in DH so that I can upload the files directly from that URL? Say, I have a file at, http://abc.com/myDirectory/Book.pdf then can I upload it to specific directory by giving this URL ? Any plug-in or extra software can help?
I would not recommend doing it this way for security reasons (I file may not be what it claims to be) - better to download the file and then upload it with FTP. That being said, to do a decent job of it you will need to make use of cURL. I suggest creating a function that accepts the URL of the “resource” you wish to upload, and the path and filename of the eventual destination. Use cURL to grab the file contents and then create, open and write the file on the server in the usual way (use relative paths when doing this part).