PHP code example of ssmr9dt / sambalogparser
1. Go to this page and download the library: Download ssmr9dt/sambalogparser 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/ */
ssmr9dt / sambalogparser example snippets
$SambaLogParser = new ssmr9dt\SambaLogParser();
$SambaLogParser->addFile("/var/log/samba/log.ssmr9dt");
$logs = $SambaLogParser->getTimestamps();
for ($i=0; $i<count($logs); $i++)
{
echo $logs[$i] . "\n";
}