You are here

public function GeoIpHandlerV1::record in GeoIP API 7.2

Returns the record matching the ip.

Parameters

string $ip: The ip to process.

Return value

object The record object found for this IP.

2 calls to GeoIpHandlerV1::record()
GeoIpHandlerV1::rawRecord in src/GeoIpHandlerV1.php
Returns an array of all information related the ip.
GeoIpHandlerV1::regionName in src/GeoIpHandlerV1.php
The region name for a given IP.

File

src/GeoIpHandlerV1.php, line 80
The GeoIP API handler for version 1 - legacy.

Class

GeoIpHandlerV1

Namespace

Drupal\geoip

Code

public function record($ip = NULL) {
  $ip = empty($ip) ? ip_address() : $ip;
  return geoip_record_by_addr($this
    ->getReader(), $ip);
}