Link to home
Start Free TrialLog in
Avatar of ranski
ranski

asked on

Downloading binary

Hello.

Just made a webcam application in flash cs3/actionscript 3. I want to be able to save bitmap data from the swf file as a jpg. I have pasted some working php code below. I would ideally like to have it in asp though as my server is based on that. Does anybody have any ideas  about doing this is asp. I have done quite a bit asp over the last few years but must admit this is beyond me.

Thanks in advance for any help.
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;
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Matthew Kelly
Matthew Kelly
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ranski
ranski

ASKER

Great advice. Thanks