maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.33k stars 276 forks source link

Unable to get user_type and queries_remaining #18

Closed marl-scot closed 10 years ago

marl-scot commented 10 years ago

Hi, I have just started to use the GeoIp PHP/composer class, and have noticed the following

$clean_ip="IP ADDRESS"; use GeoIp2\WebService\Client; $client=new Client(ID, 'KEY'); $record=$client->omni($clean_ip); $org=$records->traits->organization; $user_type=$record->traits->user_type; $remaining=$records->maxmind->queries_remaining;

the $org works, but i get an 'Unknown attribute: user_type' and 'Unknown attribute: queries_remaining' for the user_type and remaining queries. Is this just my bad coding/understanding or is it a bug?

thanks

Matt

oschwald commented 10 years ago

Try queriesRemaining and userType.