I would like to create a file on a FTP server from a variable's content. Is this possible without writing the data to a file locally first ?
This is what I can do:
$tmpfname = tempnam("/tmp", "FOO"); file_put_contents($tmpfname, $file_contents) ftp_put($conn_id, $destination_file, $tmpfname, FTP_BINARY); unlink($tmpfname);
But I would like to send
$file_contents without saving it first to a file.