I've created multiple memory based files like this:
$fp1 = fopen("php://memory", 'rw+');
fputs($fp1, "hello1");
rewind($fp1);
$fp2 = fopen("php://memory", 'rw+');
fputs($fp2, "hello2");
rewind($fp2);
echo stream_get_contents($fp1);
echo stream_get_contents($fp2);
Now I want these files to be uploadable by CURL. I know how to POST multiple files that exists on the disk with $post['file'] = "@large.jpg";
but now my files are in memory.
How to proceed?