Pixelpost Forum

Pixelpost Forum (http://www.pixelpost.org/forum/index.php)
-   Addons (http://www.pixelpost.org/forum/forumdisplay.php?f=13)
-   -   unserialize exif data (http://www.pixelpost.org/forum/showthread.php?t=10218)

Arabica 02-21-2009 07:35 AM

unserialize exif data
 
hello,
I guess php is not my language. So I already have the next question ;-)

To acces the exif data from the database Dkozikowski+ gave me the hint to unserialize the result. this works fine and after the line
PHP Code:

$exifArray unserialize($row2['exif_info']);
print_r(array_values($exifArray)); 

the output is something like this
Code:

Array
(
    [0] => 0
    [1] => 0
    [2] => 1
    [3] => 0
    [4] => 0
    [5] => 1
    [6] => 0
    [7] => 0
    [8] => 860
    [9] => Motorola
    [10] => 11
    [11] => RGB
    [12] => NIKON CORPORATION
    [13] => NIKON D300
    [14] => Normal (O deg)
    [15] => 72 dots per ResolutionUnit
    [16] => 72 dots per ResolutionUnit
    [17] => Inch
    [18] => Ver.1.00
    [19] => 2008:08:03 07:29:58
    [20] => 221
    [21] => 719
    [22] => 6
    [23] => 2.2.0.0
    [24] => N
    [25] => 52.525
    [26] => E
    [27] => 13.368666666667
    [28] => WGS-84
    [29] => 0
    [30] => 30
    [31] => 1/800 sec
    [32] => f 2.8
    [33] => Aperture Priority
    [34] => 200
    [35] => 2008:08:03 07:29:58
    [36] => 2008:08:03 07:29:58
    [37] => 0 EV
    [38] => f 2.8
    [39] => Multi-Segment
    [40] => Unknown or Auto
    [41] => No Flash
    [42] => 75 mm
    [43] =>
    [44] => 08
    [45] => 08
    [46] => 08
    [47] => 700 pixels
    [48] => 464 pixels
    [49] => One Chip Color Area Sensor
    [50] => 0
    [51] => 0
    [52] => 0
    [53] => 1
    [54] => 112
    [55] => 0
    [56] => 0
    [57] => 0
    [58] => 0
    [59] => 0
    [60] => unknown
    [61] =>
)

to get the value of key 12 I tried
PHP Code:

print_r($exifArray[12]); 

but the output is empty.... What's wrong with the syntax? Hope someone can help me out of this php.

thanks
Frank

Dkozikowski 02-21-2009 05:01 PM

PHP Code:

$exifArray unserialize($row2['exif_info']);

$exifArray array_values($exifArray);

print_r($exifArray[12]); 


Arabica 02-22-2009 07:38 PM

thanks, works like a charm ....


All times are GMT. The time now is 09:45 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.