![]() ![]() MaxMind::GeoIP2::Record::City - city.geoname_id.We strongly discourage you from using a value from any names property network # 128.101.101.101/32 Values to use for Database or Array Keys Please note that Insights # is only supported by the GeoIP2 web service and not the GeoLite2 web # service. new ( account_id: 42, license_key: 'license_key', # To use the GeoLite2 web service instead of the GeoIP2 web service, set # the host parameter to "": # host: '', ) # Replace "city" with the method corresponding to the web service that # you are using, e.g., "country", "insights". # Replace "42" with your account ID and "license_key" with your license # key. Require 'maxmind/geoip2' # This creates a Client object that can be reused across requests. If there is an error, a structured exception is thrown. Which represents part of the data returned by the web service. This model in turn contains multiple record classes, each of If the request succeeds, the method call will return a model class for the end The method corresponding to a specific end point, passing it the IP address To use this API, you must create a new MaxMind::GeoIP2::Client object organization # University of Minnesota Web Service Client Usage isp # University of Minnesota puts record. autonomous_system_organization # University of Minnesota puts record. autonomous_system_number # 217 puts record. new ( database: '/usr/share/GeoIP/GeoIP2-ISP.mmdb', ) record = reader. ![]() ![]() Require 'maxmind/geoip2' # This creates the Reader object which should be reused across lookups. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |