Zebra
Zebra

Reputation: 4006

PHP & Javascript: Image file description properties (Summary tab)

Image files come with description properties like title, subject and keyword (summary tab). How do I "get" these properties in PHP? is there a function that allows me to the same in Javascript?

Upvotes: 0

Views: 1956

Answers (2)

Rafael
Rafael

Reputation: 569

Regarding JavaScript, there is a script that will allow you to read EXIF information. It uses a rather complex technique using XMLHttpRequest.

Another technique (in its infancy) is to read the file on the client side, using the FileReader interface. An example of using FileReader to read EXIF data was posted on a Mozilla Hacks blog post.

I know you didn't mention EXIF at all and you want to access those Windows file properties. Honestly, I don't know how you'd acess those. You'd probably have to read certain bytes in the file, just like the script at the EXIF example from Mozilla Hacks does.

Upvotes: 1

mway
mway

Reputation: 4392

Take a look at the exif_read_data() function within PHP.

Here is the official PHP documentation, and here's an example of it in use.

Upvotes: 2

Related Questions