1. Go to this page and download the library: Download sajjadef98/visitors 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/ */
$tracker = new Visitors\Insert_User_Data(new MysqliDb($config));
$tracker->GUDI(); // ذخیره خودکار اطلاعات بازدید
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$visitors->chartApi(); // خروجی JSON برای AJAX
die();
}
if (isset($_GET)) {
$visitors->chart(); // نمایش صفحه با نمودار
die();
}