Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ch = curl_init();
- $source = "http://someurl.com/afile.zip";
- curl_setopt($ch, CURLOPT_URL, $source);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $data = curl_exec ($ch);
- curl_close ($ch);
- $destination = "/asubfolder/afile.zip";
- $file = fopen($destination, "w+");
- fputs($file, $data);
- fclose($file);
Add Comment
Please, Sign In to add comment