Text made from an image on another image

<?php
// Create the text from an image and a tempory mask of the word Rubblewebs
$cmd = " -size 490x110 xc:none -pointsize 90 ".
" -gravity center -fill black -annotate +0+0 \"Rubblewebs\" miff:- | ".
" composite -compose Dst_In -gravity center - input.jpg -matte";
Create tempory image
exec("convert $cmd temp.png");
// Place the word image from above over the second image
exec("composite -gravity center temp.png input1.jpg output.png ");
// Delete tempory image
unlink('temp.png');
?>This creates some text from on image and places it on another image.