1. Go to this page and download the library: Download xepozz/clk-parser 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/ */
xepozz / clk-parser example snippets
$parser = new \Xepozz\ClkParser\Parser();
$result = $parser->parseContent(file_get_contents('/path/to/file.clk'));
$result->table // access table name
$result->columns // access array of column names
$result->values // access iterable values in a pair of column names: [column => value, ...]
$parser = new \Xepozz\ClkParser\Parser();
$result = $parser->parseContent(<<<TEXT
# started at 15-Apr-24 08:06:25 # schema.table_name(date,email,event,params)9F9C34E2
(1111,'email','Startup',[1,2,3]),(2222,'email','Click',[])4CDA8189
(-1111,'','Shutdown',[-1,'string',3,''])4CDA8189
TEXT
);