iptcparse() ฟังก์ชันของภาษา PHP ที่จะถอดค่า IPCT ของรูปภาพโดยวิธีใช่ iptcparse() เราจะต้องนำข้อมูลของรูปภาพออกมาก่อนเพี่อจะสามารถแสดงค่า IPCT ของรูปภาพนั้นออกมา
ตัวอย่าง
<?php
$size = getimagesize('./test.jpg', $info);
if(isset($info['APP13']))
{
$iptc = iptcparse($info['APP13']);
var_dump($iptc);
}
?>
ผลที่ได้
array(2) {
["2#120"]=>
array(1) {
[0]=>
string(10) "Test image"
}
["2#116"]=>
array(1) {
[0]=>
string(34) "Copyright 2008-2009, The PHP Group"
}
}
ข้อมูลที่เป็น IPCT ของรูปภาพนั้นออกมา