Extracting IPTC metadata using PHP - Subject Code HEX value needed

I have a small PHP script that grabs specific IPTC tags from an image file after uploading (see below):

move_uploaded_file($_FILES['file']['tmp_name'], 'uploads/' . $_FILES['file']['name']);
$size = getimagesize('uploads/' . $_FILES['file']['name'], $info);
if(isset($info['APP13'])) { $iptc = iptcparse($info['APP13']); }
$title = $iptc["2#005"][0];
$artist = $iptc["2#025"][0];
$medium = $iptc["2#120"][0];
$date = $iptc["2#092"][0];
$credit = $iptc["2#080"][0];
$subject = $iptc["?????"][0];

All is well - except I can't for the life of me find the equivalent HEX value for the SubjectCode field! The IPTC reference documents list the value as "0x020C" - but that doesn't work. It's ID value is "2:12" according to the Adobe XMP docs. I'm stumped. Any gurus out there that can point me in the right direction?

5 Related questions 1 PHP extract and parse _ basic question 4 PHP: extracting packed hexadecimal numbers from a string 5 How to copy the IPTC data from one image to another? Related questions 1 PHP extract and parse _ basic question 4 PHP: extracting packed hexadecimal numbers from a string 5 How to copy the IPTC data from one image to another? 5 Get iptc metadata of jpg image in php 2 How to decode hex content? 9 IPTC Data Management Library 2 Convert hexadecimal string to numeric IP Address in PHP 0 HEX decode - how to decode this string? 0 Extract specification list from text (unknown format) 0 Unpack hex-encoded binary data in PHP Load 7 more related questions Show fewer related questions Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like