SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Location
    Rosario, Argentina
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pass var PHP to Perl

    I'm want to pass $filename var to Perl from PHP but I can't, lets see.

    Perl code:
    Code Perl:
    #!/usr/bin/perl -s
    use vars ($filename);
    use Image::ExifTool qw(:Public);
    my $exifTool = new Image::ExifTool;
     
    $exifTool->Options(Duplicates => 0);
    $info = $exifTool->ImageInfo($filename, 
    			'Make', 
    			'Model', 
    			'Orientation', 
    			'Exposure', 
    			'Aperture', 
    			'Flash', 
    			'ColorSpace', 
    			'FocalLength', 
    			'XResolution',
    			'YResolution',
    			'FNumber',
    			'ImageWidth',
    			'ImageHeight',
    			'LightSource',
    			'Lens',
    			'DigitalZoomRatio',
    			'Lens',
    			'Lens',
    			'ISO',
    			'ExposureCompensation',
    			'Gamma',
    			'Transformation',
    			'SceneCaptureType',
    			'GainControl',
    			'Contrast',
    			'Saturation',
    			'Sharpness',
    			'DateTimeOriginal',
    			'MeteringMode',
    			'UserComment',
    			'CreateDate',
    			'ShutterSpeedValue',
    			'WhiteBalance',
    			'ExposureMode',
    			'MaxApertureValue'
    		);
     
    foreach (keys %$info) {
        print "$_ => $$info{$_}\n";
    }

    PHP code
    PHP Code:
    $cmd "perl /Sites/test/perl/test5.pl filename=/Users/ignaciogggg/Desktop/Tests/2429007337_5c96af8f12_o.jpg";
    exec($cmd$output$retval);
    echo 
    "<pre>";
    print_r($output);
    echo 
    "</pre>"
    Any ideas?

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Location
    Rosario, Argentina
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Solved!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •