So if you checked my last post, I was uploading a 400MB file that ended up causing my VPS to lose all of its memory (2000MB memory to be exact) because it is uploading a file from one server to another server via cURL AND becasue I think file_put_contents is also the reason why it's such a resource hog.
So is there any alternatives to this code to save my memory usage?
$file = base64_decode($_POST['file']);
file_put_contents($_POST['filename'], $file);