I\'m programming something that allows users to store documents and pictures on a webserver, to be stored and retrieved later. When users upload files to my server, PHP tells m
Magic number. If you can read first few bytes of a binary file you can know what kind of file it is.