Getting dimensions of a remote image
Another straight to the point solution

$url = 'http://en.wikipedia.org/static/images/project-logos/enwiki.png';
$data = json_decode(file_get_contents('http://api.rest7.com/v1/image_info.php?url=' . $url));
if (!$data->success)
{
echo 'Failed';
}
else
{
echo 'width: ' . $data->width;
echo 'width: ' . $data->height;
echo 'extension: ' . $data->ext;
}
Comments