Salve a tutti
ho un problema con la funzione iptcparse, le immagini prese dalla cartella non corrispondono alle info di iptcparse($picinfo['APP13']),
li visualizzo, ma i valori sono sbagliati
Codice PHP:
<?php
if (empty($row->imdbid)) {
echo 'NO Photo';
}else{
$dirname = 'images_actors/*' . $row->imdbid . '/';
$images = glob($dirname."*");
}
if($images) {
?>
<?php foreach($images as $image) { ?>
<?php
$picinfo = array();
getimagesize($image, $picinfo);
//echo "<pre>";
//print_r(array_keys($picinfo));
//echo "</pre>";
if(isset($picinfo['APP13']))
{ $iptc = iptcparse($picinfo['APP13']);
}
if(isset($picinfo['APP13']))
{
$iptc = iptcparse($picinfo["APP13"]);
if (is_array($iptc)) {
$description = $iptc['2#105'][0];
$subject = $iptc['2#120'][0];
/*
$time = $iptc['2#055'][0];
$year = substr($time, 0, 4);
$month = substr($time, 4, 2);
$day = substr($time, -2);
$datetaken = date('l F jS Y', mktime(0, 0, 0, $month, $day, $year));
$city = $iptc["2#090"][0];
$country = $iptc["2#101"][0];
$creator = $iptc["2#080"][0];
*/
}
}
//print_r($subject);
//echo "<pre>";
//print_r($subject);
//echo "</pre>";
$subject2 = preg_replace('/"/', '', $subject);
?>
Codice PHP:
<a href="<?php echo $image; ?>" class="highslide" onclick="return hs.expand(this)" title="<?php echo $subject2; ?>" style="margin: 10px 15px 10px 15px">