| Server IP : 172.67.201.108 / Your IP : 216.73.217.99 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/banners/public_html/bway/pixel/ |
Upload File : |
<?php
/**
* Site Pixel Tracking Endpoint
* Replaces: sitepixel.cfm
*
* Tracks general site visits. Queues events for batch insert by cron.
* Deduplication is handled at the cron level (simpler than replicating
* the ColdFusion application-scope tracker in PHP).
*/
require_once __DIR__ . '/config.php';
require_once __DIR__ . '/PixelResponse.php';
require_once __DIR__ . '/BotFilter.php';
require_once __DIR__ . '/EventBuffer.php';
require_once __DIR__ . '/CookieManager.php';
// --- Region cookie (MUST happen before GIF flush) ---
$regid = filter_input(INPUT_GET, 'regid', FILTER_VALIDATE_INT);
if ($regid) {
CookieManager::setRegionCookie($regid);
}
// --- Send 1x1 GIF and close client connection ---
PixelResponse::sendPixelAndFlush();
// --- Everything below is invisible to the client ---
if (!BotFilter::shouldTrack()) {
exit;
}
$ip = getClientIp();
$userAgent = $_SERVER['HTTP_USER_AGENT'] ?? 'Unknown';
$referrer = $_SERVER['HTTP_REFERER'] ?? 'Direct';
$datetime = date('Y-m-d H:i:s');
EventBuffer::append('sitepixel', [
'ip' => $ip,
'user_agent' => $userAgent,
'referrer' => $referrer,
'access_time' => $datetime,
]);