You are here

private function Database::readString in Smart IP 6.2

Same name and namespace in other branches
  1. 7.2 includes/vendor/ip2location/ip2location-php/IP2Location.php \IP2Location\Database::readString()

Low level function to fetch a string from the caching backend

@access private

Parameters

int $pos Position to read from:

int $additional Additional offset to apply:

Return value

string

13 calls to Database::readString()
Database::readCityName in includes/vendor/ip2location/ip2location-php/IP2Location.php
High level function to fetch the city name
Database::readCountryNameAndCode in includes/vendor/ip2location/ip2location-php/IP2Location.php
High level function to fetch the country name and code
Database::readDomainName in includes/vendor/ip2location/ip2location-php/IP2Location.php
High level function to fetch the domain name
Database::readElevation in includes/vendor/ip2location/ip2location-php/IP2Location.php
High level function to fetch the elevation
Database::readIddAndAreaCodes in includes/vendor/ip2location/ip2location-php/IP2Location.php
High level function to fetch the IDD and area codes

... See full list

File

includes/vendor/ip2location/ip2location-php/IP2Location.php, line 1065

Class

Database
IP2Location database class

Namespace

IP2Location

Code

private function readString($pos, $additional = 0) {

  // Get the actual pointer to the string's head
  $spos = $this
    ->readWord($pos) + $additional;

  // Read as much as the length (first "string" byte) indicates
  return $this
    ->read($spos + 1, $this
    ->readByte($spos + 1));
}