views:

144

answers:

0

As of now I am using cURL to load a remote favicon, but it outputs it as a .ICO, which AS3 will not load. I tried to convert the .ICO with imagepng, but that caused errors. Is there a way I can load a remote favicon and convert it to a png with PHP before loading it into AS3 without relying on Google's s2?

Some of the code:

snip

$imagestring = curl_exec($ch);
$image = imagecreatefromstring($image);
curl_close($ch);
header("Content-Type: image/png");
imagepng($image);
imagedestroy($image);

snip