The WafAgent class

The WafAgent class retrieves basic client environment data such as timezone, Selenium usage, and client IP from browser cookies. It's designed for Web Application Firewall (WAF) intelligence and user fingerprinting.

How to use it?

$agent = new WafAgent();
$info = $agent->getInfo();

Public Usage:

$agent->getTimezone()

Returns the timezone string (from timezone cookie, or "Unknown").

$agent->isUsingSelenium()

Returns true if Selenium automation is detected via cookie.

$agent->getClientIP()

Returns the client IP from the "allowed" cookie or "null".

$agent->getInfo()

Returns an associative array with all values: timezone, usingSelenium, and clientip.

View on GitHub

Was this answer helpful? 0 Users Found This Useful (0 Votes)