PHP code example of zt / qqwry

1. Go to this page and download the library: Download zt/qqwry 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/ */

    

zt / qqwry example snippets


   use \T\Ip;
   $ip = new Ip();
   $ip->getProvince('X.X.X.X');
   $ip->getCity('X.X.X.X');
   $ip->getArea('X.X.X.X');

   $ip->getProvince('http://www.baidu.com');
   $ip->getCity('http://www.baidu.com');
   $ip->getArea('http://www.baidu.com');