Download a file in PHP

Here is a simple function to download a file in PHP and save it on your web server. I needed this for another project, so I coded it and decided to post it up here! The $file variable is the url to the file And the $savefile variable is where it should be saved on [...]