\IpSearch

使用PHP代码从[qqzeng-ip.dat]数据库的二进制文件中获取IP地址所在地理位置信息

Summary

Methods
Properties
Constants
__construct()
__destruct()
get()
BinarySearch()
GetIndex()
getEndIp()
GetLocal()
read()
ip2uint()
BytesToLong()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$firstStartIpOffset
$lastStartIpOffset
$prefixStartOffset
$prefixEndOffset
$ipCount
$prefixCount
$fp
$prefix_array
N/A

Properties

$firstStartIpOffset

$firstStartIpOffset : 

Type

$lastStartIpOffset

$lastStartIpOffset : 

Type

$prefixStartOffset

$prefixStartOffset : 

Type

$prefixEndOffset

$prefixEndOffset : 

Type

$ipCount

$ipCount : 

Type

$prefixCount

$prefixCount : 

Type

$fp

$fp : 

Type

$prefix_array

$prefix_array : 

Type

Methods

__construct()

__construct(  $database) 

Parameters

$database

__destruct()

__destruct() 

get()

get(  $ip_address) 

Parameters

$ip_address

BinarySearch()

BinarySearch(  $low,   $high,   $k) 

Parameters

$low
$high
$k

GetIndex()

GetIndex(  $left,   $startip,   $endip,   $local_offset,   $local_length) 

Parameters

$left
$startip
$endip
$local_offset
$local_length

getEndIp()

getEndIp(  $left) 

Parameters

$left

GetLocal()

GetLocal(  $local_offset,   $local_length) 

Parameters

$local_offset
$local_length

read()

read(  $stream,   $offset,   $numberOfBytes) 

Parameters

$stream
$offset
$numberOfBytes

ip2uint()

ip2uint(  $strIP) 

Parameters

$strIP

BytesToLong()

BytesToLong(  $a,   $b,   $c,   $d) 

Parameters

$a
$b
$c
$d