Most digital cameras add EXIF (Exchangeable image file format) data to photos captured nowadays, embedding information like camera type, settings, timestamps, etc. into the captured file itself, and in the process creating a host of quite important (to enthusiasts anyway) bits of meta information in the process.
Extracting this information out of photos for display on a website turns out to be particularly easy, thanks to the powerful little exif_read_data function found in PHP.
(Just a note, for the exif family of PHP functions to work, you do need exif enabled in your installation. This can be verified by a quick look through your phpinfo file).
So let’s have an active example then:
if (file_exists($filepath)) {
echo '
...