public function getMeta() { $info = array(); $size = getimagesize($this->path . $this->filename, $info); if (isset($info['APP13'])) { $app13 = $info['APP13']; $iptcUnhandled = iptcparse($app13); $returnIPTCarray = getIPTC($iptcUnhandled); print_r($returnIPTCarray); } }
function getMeta($path, $filename) { $iptc_raw = array(); $size = getimagesize($path . $filename, $iptc_raw); //print_r($size); $array = array("width" => $size[0], "height" => $size[1], "imagetype" => $size[2], "html" => $size[3], "bits" => $size[4], "channels" => $size[5], "mime" => $size[6], "other_tags" => array()); if (isset($iptc_raw['APP13'])) { $app13 = $iptc_raw['APP13']; $iptcUnhandled = iptcparse($app13); $returnIPTCarray = getIPTC($iptcUnhandled); } $array['other_tags'] = $returnIPTCarray; foreach ($array as $row => $value) { print_r($row . " : "); print_r($value); print_r("<br>"); } }