PHP won't automatically give you image dimensions at the time of upload. What it gives you is the file's in the tmp directory it's stored in upon upload, the file's original name from the sender's computer, its size, and its type. See:
http://www.php.net/manual/en/features.file-upload.php
In the script that handles the upload, check the type, and if you don't like it, do nothing with the file. It will be deleted when your scripts finishes executing.
If it does turn out to be of type .gif or .jpg, you can use GetImageSize() -- on either its tmp location or its permanent location after you move it -- to determine its dimensions. See:
http://www.php.net/manual/en/function.getimagesize.php