Use getimagesize instead of imagesx and imagesy

upload_file.php
Use getimagesize instead of imagesx and imagesy.