Created
September 14, 2018 21:48
-
-
Save ThemeMetric/b8b86d0a3b541fb1849cf0481f953d79 to your computer and use it in GitHub Desktop.
Copy and download file from remote server to local
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!@copy('https://sajjadhossain.me/file.zip','./somefile.zip')) | |
// change the remote server link to your own file link | |
{ | |
$errors= error_get_last(); | |
echo "COPY ERROR: ".$errors['type']; | |
echo "<br />\n".$errors['message']; | |
} else { | |
echo "File copied from remote!"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment