xref: /PHP-5.3/ext/exif/example.php (revision 27242a7a)
1<?php
2// (c) M.Boerger
3//
4// $Id$
5//
6?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional">
7<html>
8<head>
9<title>exif_read_data example</title>
10</head>
11<body>
12<?php
13$exif = exif_read_data ('tests/test1.jpg','IFD0');
14echo $exif===false ? "No header data found.<br>\n" : "Image contains headers<br>";
15$exif = exif_read_data ('tests/test2.jpg',0,true);
16foreach($exif as $key=>$section) {
17    foreach($section as $name=>$val) {
18        echo "$key.$name: $val<br>\n";
19    }
20}
21?>
22</body>
23</html>