Data['time_zone']; * echo ($Location->Data['suspiciousFactors']['isSuspicious'] === TRUE) ? 'TRUE' : 'FALSE'; * * * * -=[ AVAILABLE FIELDS TO CALL ]=- * 'ip' => string '127.000.000.001' * 'country_code' => string 'US' * 'country_name' => string 'United States' * 'is_in_european_union' => boolean false * 'region_name' => string 'STATE' * 'region_code' => string 'ST' * 'city' => string 'City' * 'zip_code' => string '00000' * 'time_zone' => string 'America/Chicago' * 'latitude' => float 00.0000 * 'longitude' => float -00.0000 * 'metro_code' => int 000 * 'organisation' => string 'Fiber' * 'flagUrl' => string 'https://ip-api.io/images/flags/us.svg' * 'emojiFlag' => string '🇺🇸' *** USED ABOVE for SVG NAME *** * 'currencySymbol' => string '$' * 'currency' => string 'USD,USN,USS' * 'callingCode' => string '1' * 'countryCapital' => string 'Washington D.C.' * 'suspiciousFactors' => * 'isProxy' => boolean false * 'isTorNode' => boolean false * 'isSpam' => boolean false * 'isSuspicious' => boolean false * ******************************************************************************************************************* * Revisions: * YYYY-MM-DD XXX Description * ******************************************************************************************************************/ require_once 'location_api_key.php'; class Location { private $Data; public function __construct() { $this->Data = json_decode(file_get_contents('https://ip-api.io/api/json?api_key=LOCATION_API_KEY'), TRUE); } public function __get($item) { if(property_exists($this, $item)) { return $this->$item; } } }