Help commenting this code

Hi.
I need help commenting these peice of coding if possible. The code below saves the image and sends it across to save.php file to display on a sperate browser.

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("save.php", "output", "POST");

}
stop();

I also need the save.php coding below to be commented please if possible:

<?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” );
ImageJPEG( $image );
imagedestroy( $image );
?>

cheers for your help