PHP code example of jinyicheng / ip-analyst
1. Go to this page and download the library: Download jinyicheng/ip-analyst library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jinyicheng / ip-analyst example snippets
use IpAnalyst\IpAnalyst;
class ClassName {
public function foo1(){
echo json_encode(IpAnalyst::getRegionDetail('202.197.209.133'));
}
public function foo2(){
echo json_encode(IpAnalyst::getRegionCode('202.197.209.133'));
}
public function foo3(){
echo json_encode(IpAnalyst::getRegionInfo('202.197.209.133'));
}
public function foo4(){
echo json_encode(IpAnalyst::regionList());
}
}