I am using the imagecreatefromjpeg () function to merge two images.
Now the problem that I am facing is that when I use photos from my server, it works fine, and when I use images from another site, it does not work.
For example: when I use this PHP file http://coolfbapps.in/test/merger.php with function
imagecreatefrompng('http://coolfbapps.in/test/1.png');
It works great as the image is on my own server
but when I change this function, put a link to an image that is not on my server,
eg.
imagecreatefrompng('http://www.businesseconomics/Test.png');
he does not work. (image file is missing on my server)
offer me an alternative to this feature or a solution that I want to use in Facebook applications.
Functions such as file-get-contents also show the same error. I hope this is not a server problem. allow_url_fopen is on but allow_url_include is off
Refresh ... Actual code. I use this to merge two images
$dest = imagecreatefrompng('http://coolfbapps.in/test/1.png'); $src = imagejpeg('http://img.allvoices.com/thumbs/image/111/111/75152279-pic.jpg'); imagealphablending($dest, false); imagesavealpha($dest, true); imagecopymerge($dest, $src, 10, 9, 0, 0, 181, 180, 100); header('Content-Type: image/png'); imagepng($dest); imagedestroy($dest); imagedestroy($src);