Thread: Getting Images
View Single Post
Old 05-30-2010, 05:32 PM   #6 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

As suggested, you might be better off learning if there is an efficient way of doing this with actionscript, but if you are determined to use PHP you have two pretty straight forward options. Find out if you have allow_url_fopen enabled on your host, and then it's as easy as;

php Code:
$image_url = 'http://www.pokemonelite2000.com/sprites/plmfa/1.png';
$local = imagecreatefrompng( $image_url );

// This displays the image, but it's just as easy to save it
header( 'Content-Type: image/png' );

imagepng( $local );
imagedestroy( $local );

If allow_url_fopen is disabled, cURL can do what you need.
delayedinsanity is offline  
Reply With Quote
The Following User Says Thank You to delayedinsanity For This Useful Post:
Monferno (05-30-2010)