Форуми / Craftwork / Server-side / Sending a PHP generated image as multipart/form data

GHengeveld
#9920 13.03.2009 04:07
I'm working on a script that generates a jpeg image using GD2. After generating the image I want to 'submit' it to an upload script that takes a multipart/form data image.
Normally this script will only accept images that are submitted using <input type="file" />, but I want to use the PHP generated image, without having to save the file to disk and manually select it for upload.

Is there any way to trick the upload script to think it is receiving image data instead of the image url? I have no control over the upload script, I can only call it with an html form, by providing an upload token and form data in the POST.

(To me more precise, I want to upload something to Hyves.nl using it's API.)