use this php code.
for flash php image prosses.
--------------------------------------------------------
flash file
--------------------------------------------------------
import flash.display.BitmapData;
shaF.onPress = function() {
output();
};
function output() {
snap = new BitmapData(mc._width, mc._height);
snap.draw(mc);
var pixels:Array = new Array();
var w:Number = snap.width;
var h:Number = snap.height;
for (var a = 0; a<=w; a++) {
for (var b = 0; b<=h; b++) {
var tmp = snap.getPixel(a, b).toString(16);
pixels.push(tmp);
}
}
var output:LoadVars = new LoadVars();
output.img = pixels.toString();
output.height = h;
output.width = w;
output.send("show.php", "output", "POST");
}
stop();
----------------------------------------------------------------
PHP file (show.php)
--------------------------------------------------------
<?php
$data = explode(",", $_POST['img']);
$width = $_POST['width'];
$height = $_POST['height'];
$image=imagecreatetruecolor( $width ,$height );
$background = imagecolorallocate( $image ,0 , 0 , 0 );
//Copy pixels
$i = 0;
for($x=0; $x<=$width; $x++){
for($y=0; $y<=$height; $y++){
$int = hexdec($data[$i++]);
$color = imagecolorallocate ($image, 0xFF & ($int
>> 0x10), 0xFF & ($int >> 0x8), 0xFF & $int);
imagesetpixel ( $image , $x , $y , $color );
}
}
//$font = imageloadfont('arial.ttf');
$font = 'arial.ttf';
// $text_color = imagecolorallocate($image, 233, 14, 91);
$black = imagecolorallocate($image, 0, 0, 0);
//imagestring($image, $font, 5, 5, "A Simple Text String",
$text_color);
imagettftext($image, 12, 0, 10, 20, $black, $font, "A Simple
Text String");
//Output image and clean
//header("Content-Type: image/png");
imagepng($image,"finoy.png");
imagedestroy( $image );
?>
<html>
<body>
<img src="finoy.png" width="159" height="159" />
</body>
</html>