How to create and save an image from the specified url | |||||||||||||||||||||||
|
|||||||||||||||||||||||
<? /* * The code below creates and saves an image from the url specified. URL must return an image and should not be an html page. The __FILE__ is a PHP constant * and returns the absoulte path of current file */ $url="http://snapcasa.com/get.aspx?code=5348&size=l&url=http://www.yahoo.com"; $contents=file_get_contents($url); $img=imagecreatefromstring($contents); $img_path=dirname(__FILE__)."/thumb.jpg"); imagejpeg($img,$img_path); ?> The above code was highlighted with Neat Highlighter |
|||||||||||||||||||||||
|
|||||||||||||||||||||||
| Leave a Comment | |||||||||||||||||||||||
|
|||||||||||||||||||||||