I am trying to download image from here
the above url by using both php curl and file_get_content. But when i am using php curl the image is downloaded but it have no content, when i am using file_get_content
the following error occurs,
Warning: file_get_contents(http://s3.amazonaws.com/test_bucket/test_12_12_2013_10_51_00.jpg) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 505 HTTP Version Not Supported in /home/webdev/public_html/example/photos/download.php on line 11
First of all the link you provided is not an image. It outputs..
Tested & Works !
Below code reads an image from an URL, saves it and then opens/renders on browser.
OUTPUT :
Or
If you want just to render it.. Do like this.