<?php require_once __DIR__ . '/../config/config.php'; $deviceDetector = DeviceDetectorFactory::getInstance()->getDeviceDetector($deviceDetetorServerPath, ['browserDetails', 'osDetails']); $deviceDetails = $deviceDetector->getDeviceDetails($ua); $currentBrowser = $deviceDetails['browserDetails']["name"] . " " . $deviceDetails['browserDetails']["version"]; $currentOs = $deviceDetails['osDetails']["name"] . " " . $deviceDetails['osDetails']["version"]; $data = json_decode($_REQUEST["data"], true); $browser = ["browser" => $currentBrowser, "os" => $currentOs]; $heatMapData = array_merge($data, $browser); if ($heatMapData["screenRes"] && $heatMapData["appId"]) { $objLogManager = HeatmapBaseLogFactory::getInstance()->getInsertLogManager(); $objLogManager->insertHeatMapDataInfo($heatMapData); }
<?php require_once __DIR__ . '/../lib/authentication/Authenticator.php'; require_once __DIR__ . '/../config/config.php'; ini_set('memory_limit', '1024M'); $browserId = $_REQUEST['browserId']; $osId = $_REQUEST['osId']; $resolutionId = $_REQUEST['resolutionId']; $startDate = strtotime($_REQUEST['startDate']); $endDate = strtotime($_REQUEST['endDate']); $daterange = new HeatmapValidator($startDate, $endDate); $daterange->validateDate(); $coordinfo = HeatmapBaseLogFactory::getInstance()->getCoordinateLog($browserId, $osId, $resolutionId); $coordinates = $coordinfo->getCoordinateInfo($_REQUEST, $browserId, $osId, $resolutionId); echo $_REQUEST["callBack"] . '(' . json_encode($coordinates) . ')';
<?php require_once __DIR__ . '/../lib/authentication/Authenticator.php'; require_once __DIR__ . '/../config/config.php'; $startDate = strtotime($_REQUEST['startDate']); $endDate = strtotime($_REQUEST['endDate']); $daterange = new HeatmapValidator($startDate, $endDate); $daterange->validateDate(); $browserId = implode(",", $_REQUEST['browserId']); $osId = implode(",", $_REQUEST['osId']); $resolutionId = implode(",", $_REQUEST['resolutionId']); $result = HeatmapBaseLogFactory::getInstance()->getFilterLogManager($browserId, $osId, $resolutionId); $filter = $result->getData($_REQUEST['startDate'], $_REQUEST['endDate'], $_REQUEST['appId']); echo $_REQUEST["callBack"] . '(' . json_encode($filter) . ')';
<?php require_once __DIR__ . '/../lib/authentication/Authenticator.php'; require_once __DIR__ . '/../config/config.php'; $browserId = $_REQUEST['browserId']; $osId = $_REQUEST['osId']; $resolutionId = $_REQUEST['resolutionId']; $startDate = strtotime($_REQUEST['startDate']); $endDate = strtotime($_REQUEST['endDate']); $daterange = new HeatmapValidator($startDate, $endDate); $daterange->validateDate(); $urlInfo = HeatmapBaseLogFactory::getInstance()->getUrlLog($browserId, $osId, $resolutionId); $url = $urlInfo->getUrlInfo($_REQUEST, $browserId, $osId, $resolutionId); echo $_REQUEST["callBack"] . '(' . json_encode($url) . ')';