PHP code example of wikimedia / xmp-reader
1. Go to this page and download the library: Download wikimedia/xmp-reader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wikimedia / xmp-reader example snippets
composer
use Wikimedia\XMPReader\Reader as XMPReader;
//...
// Check if the php instance has the r();
// or
$xmp = new XMPReader( $logger, $filename );
// where $logger is an implementation of Psr\Log\LoggerInterface and $filename a string describing the origin of your XMP content
// To parse XMP data in $string
$xmp->parse( $string );
// To parse XMP Extended data in $string
$xmp->parseExtended( $string );
// To retrieve the parsed results
$results = $xmp->getResults();
[
'xmp-exif' => [],
'xmp-general' => [],
'xmp-deprecated' => [],
]