PDA

View Full Version : restricting dimensions of linked images


The Keeper
23 Mar 2002, 10:30
Hi I want to restrict how big someone can link an avatar (I'm using a hack that lets you link off another website rather than upload)
however it places no restrictions on file size, is there any way to set up a thing that checks a file's size/dimension when it is put in a form?

whizkid
21 Apr 2002, 12:53
Hi,

the the PHP function getimagesize() (http://www.php.net/manual/en/function.getimagesize.php) you can get the dimentions of an image.

Try this:
print_r(getimagesize("http://www.php.net/gifs/php_logo.gif"));


whizkid