if ((($_FILES["uploadedfile"]["type"] == "image/gif") || ($_FILES["uploadedfile"]["type"] == "image/jpeg") || ($_FILES["uploadedfile"]["type"] == "image/pjpeg")) && ($_FILES["uploadedfile"]["size"]/1024<100)) When I test the code above, I found that a user can bypass the file type check by simply modifying the extension name, how to get the real file extension name?
Also, when a user uploads a very large file, how to immediately reject the upload on the server side?