How should I properly handle a facebook image file_get_contents "failed to open stream: HTTP request failed!"
===

I have a facebook application that compose a new image out of user existing facebook images. 
The client sends the images sources (link) to the backend which creates the composite with php imagemagick.

From time to time I get this error in log files:

    [26-Jul-2012 04:55:03 UTC] PHP Warning:  file_get_contents(http://a8.sphotos.ak.fbcdn.net/hphotos-ak-ash4/s720x720/some_file_name.jpg): failed to open stream: HTTP request failed!

When I check the link I see that the picture exists.

Two Questions:

1. Is there a different way to retrieve the image that's avoid this problem?
2. How can I recover from this error, should I just retry my request and wish for the best?

