To copy the alpha channel from one image to another, you can do the following:
<?php
$img1 = new Imagick( "image1.png" );
$img2 = new Imagick( "image2.png" );
$img1->compositeImage( $img2, imagick::COMPOSITE_COPYOPACITY, 0, 0 );
header('Content-type: image/png');
echo $img1;
?>