ExifTool Forum

ExifTool => Newbies => Topic started by: machouinard on March 01, 2012, 03:41:17 PM

Title: Is ExifTool supposed to be working from a PHP script without -php and eval()?
Post by: machouinard on March 01, 2012, 03:41:17 PM
Okay, Newbie forum, newbie question.

I was under the impression that with the addition of -php I'd be able grab an array of EXIF data in a PHP script.  That seems to be working fine, but just for the hell of it I tried

$exif = `exiftool  -h -g $image`;

and that works just fine, too.  Gives me a nice formatted table to plug into my site.  Is it supposed to work this way?  I've been using PHP for several months now but this is my first experience with PERL.  I'm not looking for a tutorial or anything (although that could help clear up some other questions).  Just want to know what I should expect to be happening.

Using:
ExifTool 8.77
PHP 5.3.10

HostGator Shared Linux Hosting

Thanks,
Mark
Title: Re: Is ExifTool supposed to be working from a PHP script without -php and eval()?
Post by: Phil Harvey on March 02, 2012, 12:16:34 AM
Hi Mark,

The exiftool application interacts with PHP just like any other command-line application.  The -php option only provides an output that is formatted as a PHP array, but you may capture any of the output formats that you like as you have done with the -h output.

- Phil