Fijate en los comentarios de los usuarios de la función que tengas problemas o quieras "alternativas" .. suelen publicar código interesante.
Cita: djwishbone at hotmail dot com
19-Nov-2003 04:31
Using remote files with getimagesize($URL) never worked for me. Except when I would grab files from the same server. However, I developed some code with the help from the people here that does work. If you are having problems give this function a shot:
Código PHP:
function getimagesize_remote($image_url) {
$handle = fopen ($image_url, "rb");
$contents = "";
if ($handle) {
do {
$count += 1;
$data = fread($handle, 8192);
if (strlen($data) == 0) {
break;
}
$contents .= $data;
} while(true);
} else { return false; }
fclose ($handle);
$im = ImageCreateFromString($contents);
if (!$im) { return false; }
$gis[0] = ImageSX($im);
$gis[1] = ImageSY($im);
// array member 3 is used below to keep with current getimagesize standards
$gis[3] = "width={$gis[0]} height={$gis[1]}";
ImageDestroy($im);
return $gis;
}
goodluck
Ahora .. podría ser que a su vez tengas deshabilitados los "wrappers" externos (http:// .. etc ...) en ese caso este método tampoco te funcionará. Solución: cambiate de proveedor.
Un saludo,