Gu3st...
2011-05-16 21:35:35
I'm trying to load an image from the url "http://images1.wikia.nocookie.net/runescape/images/1/10/RuneScape_Worldmap.png" into memory and draw some other .png's on top of that (with transparency). I can't even get it to load the image from an url :(
I've been trying to do this for hours now!
Any PHP-gurus out there that could help me?
E: This is what I've done:
I've been trying to do this for hours now!
Any PHP-gurus out there that could help me?
E: This is what I've done:
header("Content-type: image/png");
$src = 'http://images1.wikia.nocookie.net/runescape/images/1/10/RuneScape_Worldmap.png';
$ch = curl_init();
$timeout = 0;
curl_setopt($ch, CURLOPT_URL, $src);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$image = curl_exec($ch);
curl_close($ch);
$worldmap_image = imagecreatefromstring($image);
imagepng($worldmap_image);
imagedestroy($worldmap_image);