-1

I want to know how to download file PDF from URL link or another source.

Example : I have this link : www.nba.com/gamenotes/warriors.pdf if you click that link your browser automatically read the PDF and show the PDF or you can automatically download the PDF file using third party apps.

And i want to know a PHP code that download the PDF file from that link for example and save it to my computer

1 Answers1

0

The idea is is

Load file from URL and then put content to user to download it.

   file_put_contents("Tmpfile.zip", file_get_contents("http://someurl/file.zip"));

Try this

Download File to server from URL

http://4rapiddev.com/php/download-image-or-file-from-url/

Community
  • 1
  • 1
thep
  • 166
  • 1
  • 8