latrell / QQWry by Latrell

纯真 IP 库 Laravel 版 。
4,406
25
2
Package Data
Maintainer Username: Latrell
Maintainer Contact: i@latrell.me (Latrell Chan)
Package Create Date: 2016-01-08
Package Last Update: 2020-03-16
Home Page: https://www.latrell.me
Language: PHP
License: MIT
Last Refreshed: 2024-04-26 03:04:04
Package Statistics
Total Downloads: 4,406
Monthly Downloads: 54
Daily Downloads: 1
Total Stars: 25
Total Watchers: 2
Total Forks: 7
Total Open Issues: 3

QQWry

纯真 IP 库 Laravel 版 。

数据库版本:2018-03-15

纯真IP库

官网:http://www.cz88.net
在官网右上角有个IP数据库下载

安装

composer require latrell/qqwry dev-master

更新你的依赖包 composer update 或者全新安装 composer install

例子

Facades用法

	$ip = mt_rand(); // 取一个随机IP。
	$ip = QQWry::ntoa($ip); // 将IP转换成文本型格式。
	$record = QQWry::query($ip); // 取出IP对应的地址。
	echo "\n", $ip, "\t", $record['country'], "\t", $record['area']; // 输出结果。

在视图中

	@inject('qqwry', 'qqwry')
	
	{{ $qqwry->query('127.0.0.1')->implode(' ') }}