If a file is uploaded to the server, is there a way using PHP, to make sure that it\'s actually a picture and not just a file with a .jpg or .gif extension?
The most efficient way would be to look at the beginning bytes of the file and test for 'magic number' file specifier. Here is a list of magic numbers.