I develop a php script to replace a current one, that will have a lot of exposure to various markets/countries.
This script between others offers an photo upload functionali
You should also check uploaded file size, as getimagesize can sometimes exceed available RAM memory. It's also good to assume that your script can crash at any point (for example when the electricity go down), so you should implement some clean up procedures to remove left, unneeded files.