check a valid file extension and size in php