ho preso questa funzione su php net
ma mi restituisce questo errore

Resource id #1 PHP Warning: imagecreatefromjpeg: Unable to open 'http://xoomer.virgilio.it/miosito/img.jpg' for reading in...
eppure guardando su phpinfo
allow_url_fopen è impostato su
Local Value on
Master Value on

help me please

codice:
function LoadJpeg($imgname)
{
   $im = imagecreatefromjpeg($imgname); /* Attempt to open */
   if (!$im) { /* See if it failed */
       $im  = imagecreate(150, 30); /* Create a blank image */
       $bgc = imagecolorallocate($im, 255, 255, 255);
       $tc  = imagecolorallocate($im, 0, 0, 0);
       imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
       /* Output an errmsg */
       imagestring($im, 1, 5, 5, "Error loading $imgname", $tc);
   }
   return $im;
}

$file="http://xoomer.virgilio.it/miosito/img.jpg";

echo LoadJpeg($file);