Overview

Namespaces

  • GeoIp2
    • Database
    • Exception
    • Model
    • Record
    • WebService
  • PHP

Classes

  • AbstractPlaceRecord
  • AbstractRecord
  • City
  • Continent
  • Country
  • Location
  • MaxMind
  • Postal
  • RepresentedCountry
  • Subdivision
  • Traits
  • Overview
  • Namespace
  • Class
  • Tree

Class Location

Contains data for the location record associated with an IP address

This record is returned by all the end points except the Country end point.

GeoIp2\Record\AbstractRecord implements JsonSerializable
Extended by GeoIp2\Record\Location
Namespace: GeoIp2\Record
Located at GeoIp2/Record/Location.php
Methods inherited from GeoIp2\Record\AbstractRecord
__isset(), jsonSerialize()
Magic properties summary
public integer $accuracyRadius

The radius in kilometers around the specified location where the IP address is likely to be. This attribute is only available from the Insights end point.

public float $latitude

The latitude of the location as a floating point number. This attribute is returned by all end points except the Country end point.

public float $longitude

The longitude of the location as a floating point number. This attribute is returned by all end points except the Country end point.

public integer $metroCode

The metro code of the location if the location is in the US. MaxMind returns the same metro codes as the Google AdWords API. This attribute is returned by all end points except the Country end point.

public string $timeZone

The time zone associated with location, as specified by the IANA Time Zone Database, e.g., "America/New_York". This attribute is returned by all end points except the Country end point.

GeoIP2 PHP API v2.1.1 API documentation generated by ApiGen