كود:
01// Load the image where the logo will be embeded into02$image = imagecreatefromjpeg($_GET['imageURL']);
03 
04// Load the logo image
05$logoImage = imagecreatefrompng("logo.png");
06imagealphablending($logoImage, true);
07 
08// Get dimensions
09$imageWidth=imagesx($image);
10$imageHeight=imagesy($image);
11 
12$logoWidth=imagesx($logoImage);
13$logoHeight=imagesy($logoImage);  
14 
15// Paste the logo
16imagecopy(
17   // source
18   $image,
19   // destination
20   $logoImage,
21   // destination x and y
22   $imageWidth-$logoWidth, $imageHeight-$logoHeight,
23   // source x and y
24   0, 0,
25   // width and height of the area of the source to copy
26   $logoWidth, $logoHeight);
27 
28// Set type of image and send the output
29header("Content-type: image/png");
30imagePng($image);
31 
32// Release memory
33imageDestroy($image);
34imageDestroy($imageLogo);