I have absolutely no problem with that code you have posted. Displays the image just fine..
Would it be possible for you to find out and let us know if the setting ‘allow_url_fopen’ is turned on or off in your php ini file? And if off would it be possible to turn it on?