(PECL geoip >= 1.1.0)
geoip_asnum_by_name — 锟斤拷取锟斤拷锟斤拷系统锟斤拷(ASN)
$hostname
) : stringgeoip_asnum_by_name() 锟斤拷锟斤拷锟斤拷锟结返锟截猴拷 IP 锟斤拷址锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟较低筹拷锟�(ASN)锟斤拷
hostname
锟斤拷锟斤拷锟斤拷 IP 锟斤拷址锟斤拷
锟斤拷锟斤拷晒锟斤拷锟斤拷岱碉拷锟斤拷锟斤拷锟较低筹拷牛锟斤拷锟斤拷锟斤拷锟斤拷锟捷匡拷锟斤拷未锟揭碉拷锟斤拷锟斤拷锟较拷蚍祷锟� FALSE
锟斤拷
Example #1 geoip_asnum_by_name()锟斤拷锟斤拷锟侥凤拷锟斤拷锟斤拷
锟斤拷锟铰达拷锟诫将锟斤拷锟斤拷锟� www.example.com 锟斤拷锟斤拷锟斤拷 ASN锟斤拷
<?php
$asn = geoip_asnum_by_name('www.example.com');
if ($asn) {
echo 'The ASN is: ' $asn;
}
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
The ASN is: AS15133 EdgeCast Networks, Inc