/**
* Display all found IPTC information from image. Can be called statically
*
* @access public
* @param mixed $fullImgPath
* @return mixed HTML String from parsed array using iptcparse()
* @link [url]http://us2.php.net/manual/en/function.iptcparse.php#39650[/url]
* @see link regarding information on IPTC information
* @link [url]http://www.iptc.org[/url]
* @see link regarding IPTC
*/
function &displayIPTC($fullImgPath) {
$size = @getimagesize($fullImgPath, $infoArray);
if (is_array($infoArray)) {
$iptcArray = @iptcparse($infoArray['APP13']);
if (is_array($iptcArray) && @sizeof($iptcArray) > 0)
foreach (@array_keys($iptcArray) as $info) for ($i = 0; $i < @sizeof($iptcArray[$info]); $i++) $html .= $info .' = ' . $iptcArray[$info][$i] . '<br>';
}
return $html;
}
This class method will extract and display any found IPTC data within an image. HOwever, there is one problem that on occasions, my IPTC data comes back as:
How can I prevent displays such as this in favor of actual, readable language-constructed IPTC data if found?
Is there a PHP version of the AEL function is_word()?
Thanx
Phil