for memory mode only
the original db binary string
Type
$dbFile
$dbFile :
Type
Methods
__construct()
__construct( $ip2regionFile)
construct method
Parameters
$ip2regionFile
memorySearch()
memorySearch( $ip) : array|null
all the db binary string will be loaded into memory
then search the memory only and this will a lot faster than disk base search
Note:
invoke it once before put it to public invoke could make it thread safe
Parameters
$ip
Returns
array|null
binarySearch()
binarySearch( $ip) : mixed
get the data block through the specified ip address or long ip numeric with binary search algorithm
Parameters
$ip
Returns
mixed
—
Array or NULL for any error
btreeSearch()
btreeSearch( $ip) : Mixed
get the data block associated with the specified ip with b-tree search algorithm
Note: not thread safe