1. Go to this page and download the library: Download alternatex/widespread 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/ */
alternatex / widespread example snippets
// ...
Widespread\Widespread as Widespread;
// ...
$data = Widespread::FetchMetadata(
// path to entity
'test/examples/members/',
// properties to extract
array('UUID', 'Name', 'Repository', 'Version', 'Sort', 'Status'),
// sort by field
'Sort',
// sort ascending
false,
// filters to apply
array(
// published only
'Status' => array(
array('NOT', 'Published')
),
// restrict by name
'Name' => array(
array('IN', array('Include_1', 'Include_2')),
array('EX', array('Exclude_1'))
),
// restrict by age
'Sort' => array(
array('LT', 1000),
array('GT', 200)
)
)
);