PHP code example of zhp / data-collector
1. Go to this page and download the library: Download zhp/data-collector 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/ */
zhp / data-collector example snippets
use Zhp\DataCollector\DataCollector;
use Zhp\DataCollector\Collectors\MemoryCollector;
use Zhp\DataCollector\Storages\FileStorage;
$dataCollector = new DataCollector;
$dataCollector->setStorage(new FileStorage(__DIR__ . '/logs'));
$dataCollector->addCollector(new MemoryCollector);
$dataCollector->getData();