I have some images without extension in their name. Now, when I want to open them some browsers can't detect data as image and show up the binary text.
What is the right script (php) which will take the address of such image, detect it's format and set right headers with image output?