Skip to content

Instantly share code, notes, and snippets.

@ratulcse10
Created November 17, 2015 15:49
Show Gist options
  • Save ratulcse10/517daaa88ae3eb5e6bae to your computer and use it in GitHub Desktop.
Save ratulcse10/517daaa88ae3eb5e6bae to your computer and use it in GitHub Desktop.
copy file from another server php
<?php
$file = 'http://45.55.242.143/cse_carnival_2015.tar.gz';
$newfile = '/home/csecarnival/public_html/cse_carnival_2015.tar.gz';
if ( copy($file, $newfile) ) {
echo "Copy success!";
}else{
echo "Copy failed.";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment