Jump to content

limit on image that we want to upload


mayuresh86

Recommended Posts

<?php

$img = 'http://www.desiglitters.com/wp-content/uploads/2009/02/dragon-desi-glitters-7.gif';
$maxX = 130;
$maxY = 110;

list($imgX, $imgY) = getimagesize($img);

if ($imgX > $maxX || $imgY > $maxY)
{
    die("Image is too large. ($imgX x $imgY)");
}
else
{
    die("Image is small enough. ($imgX x $imgY)");
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.