When flash will create custom picture it will send it to “jpg_encoder_download.php” with parameter “name” (name=navnelapper.jpg in test variant)

ATTENTION path to php-script is relative (i.e. it must be in same folder with flash right now, if needed it's possible to give any other path in current domain)

* Method: POST

* RequestHeader: “Content-type”, “application/octet-stream”

* Format of picture: jpeg (.jpg or .jpeg)

there's a sample of php-script (found on site):

if (isset($GLOBALS[“HTTP_RAW_POST_DATA”])) {

// get bytearray
$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];
// add headers for download dialog-box
header('Content-Type: image/jpeg');
header("Content-Disposition: attachment; filename=".$_GET['name']);
echo $jpg;

}

link to flash:

http://merkalt.almeydahost.com/site_new/pic_loader.html

link above if you face any questions:

http://designreviver.com/tutorials/actionscript-3-jpeg-encoder-revealed-saving-images-from-flash/

Image data, received from flash, saved to http://merkalt.almeydahost.com/site_new/ with a name navnelapper.jpg and resolution 600×600 DPI.