Mam skrypt watermarka, chciałbym aby nakładał on znak wodny na obrazek umieszczony w linku z zewnętrznego serwera lecz skrypt nie chce działać (nie wyświetla obrazka) co może tu być nie tak?
obrazek z zewnątrz to: http://api.qrserver.com/v1/create-qr-code/...#38;prov=goqrme
mam pliki watermark1.php
<?php // this tells the browser to render jpg image // getting the image name from GET variable $image = $_GET['image']; // creating png image of watermark $watermark = imagecreatefrompng('watermark.png'); // getting dimensions of watermark image $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); // creating jpg from original image $image_path = $image; $image = imagecreatefromjpeg($image_path); //something went wrong if ($image === false) { return false; } // getting the dimensions of original image // placing the watermark 5px from bottom and right $dest_x = $size[0] - $watermark_width - 5; $dest_y = $size[1] - $watermark_height - 5; // blending the images together imagealphablending($image, true); imagealphablending($watermark, true); // creating the new image imagecopy($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height); imagejpeg($image); // destroying and freeing memory imagedestroy($image); imagedestroy($watermark); ?>
i watermark.php
<img src="watermark1.php?image=http://api.qrserver.com/v1/create-qr-code/?data=forum.php.pl%20%3A)&size=250x250&prov=goqrme">