Hello,
I have a flash movie that exports pixel to php file, the script of php file:
<?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 );
}
}
//Output image and clean
header( "Content-type: image/jpeg" );
header("Content-Disposition: attachment; filename=3piece.jpg");
ImageJPEG( $image );
imagedestroy( $image );
?>
I want to email the image as attachment with some text (the user gives from flash into input filed the email address, "like send to a friend").
After that I want to auto save (because now the script asks the user for save) the image into a folder "image" and I need every image with different name.
var_send_to = is the variable into flash for the user to fill (his friend email to send the image with some text)
var_send_text = is the variable (into flash) name for the text
sorry for my bad English..
hope someone can help,
thanks