QQWry.php 343 B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Components;
  3. use itbdw\Ip\IpLocation;
  4. class QQWry
  5. {
  6. /**
  7. * 查询IP地址的详细信息
  8. *
  9. * @param string $ip IPv4
  10. *
  11. * @return array
  12. */
  13. public static function ip($ip)
  14. {
  15. $filePath = public_path('qqwry.dat');
  16. return IpLocation::getLocation($ip, $filePath);
  17. }
  18. }