Below is the code to generate an image dynamically in php. I want to add some image in this dynamically created image. I've already tried my luck with imagecopy but failed because I think it deals with the already created image to copy one onto another. So please help asap. Thanks in advance. :)
<?php
$my_img = imagecreate( 1200, 630 );
$background = imagecolorallocate( $my_img, 2,144,162 );
$text_colour = imagecolorallocate( $my_img, 255, 255, 0 );
$text_colour1 = imagecolorallocate( $my_img, 255, 255, 255 );
$line_colour = imagecolorallocate( $my_img, 128, 255, 0 );
$font='C:\Windows\Fonts\ARLRDBD.ttf';
imagettftext($my_img, 48, 0, 450, 100, $text_colour, $font,"Hello World");
$font1='C:\Windows\Fonts\Arial.ttf';
imagettftext($my_img, 32, 0, 650, 160, $text_colour1, $font1,Hello World" );
imagettftext($my_img, 32, 0, 500, 300, $text_colour1, $font1,"Hello World" );
imagettftext($my_img, 32, 0, 560, 440, $text_colour1, $font1,"Hello World" );
header( "Content-type: image/png" );
imagepng( $my_img );
imagepng( $my_img,'Ethers.png' );
imagecolordeallocate( $text_colour );
imagecolordeallocate( $text_colour1 );
imagecolordeallocate( $background );
imagedestroy($my_img);
header('Content-Type: image/png');
imagedestroy($my_img);
?>