Skip to content
Advertisement

Can not get key value from maxmind return object

I am using maxmind web service to get the user data:

Here is the PHP code to output the data.

Now here you can see I have commented out ip_address, user_type, is_anonymous, is_anonymous_proxy, is_anonymous_vpn, is_tor_exit_node key because I can’t get value using those keys?

can you tell me why?

JavaScript

but If I do

JavaScript

I can see full object containing all the data.

Updated

Actual Object that is return https://codeshare.io/ad3nVy

Advertisement

Answer

you need to use the names as per these keys:

JavaScript

So, basically for example:

$record->traits->ipAddress

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement