substr($fingerprint_hash, 0, 16) . '...', 'ban_reason' => $ban_info['reason'] ]); http_response_code(403); exit('Access denied'); } // Track the fingerprint VFingerprint::trackFingerprint($fingerprint_hash, [ 'client_data' => $fingerprint_data, 'page_url' => $_SERVER['HTTP_REFERER'] ?? '' ]); // Store fingerprint in session for future checks $_SESSION['browser_fingerprint'] = $fingerprint_hash; // Check for threats and auto-ban if necessary $threats = VFingerprint::detectFingerprintThreats($fingerprint_hash); if ($threats['threat_level'] >= 5) { VFingerprint::autoBanFingerprint($fingerprint_hash); // Log the auto-ban VIPTracker::logActivity('fingerprint_auto_banned', [ 'fingerprint' => substr($fingerprint_hash, 0, 16) . '...', 'threats' => $threats['threats'], 'threat_level' => $threats['threat_level'] ]); http_response_code(403); exit('Access denied - suspicious activity detected'); } // Return success response http_response_code(200); echo json_encode([ 'status' => 'success', 'fingerprint_id' => substr($fingerprint_hash, 0, 16) . '...', 'threat_level' => $threats['risk_assessment'] ]); } catch (Exception $e) { error_log("Fingerprint handler error: " . $e->getMessage()); http_response_code(500); exit('Internal server error'); } ?>