how about for hosts which have the fopen wrapper disabled? (allow_url_fopen to in the php.ini)
you should check to see if its enabled or not , if it isnt you should fall back on something like curl to download the image then use imagecreatefromstring().