Giter Club home page Giter Club logo

qqwry's Introduction

QQWry

纯真 IP 库 Laravel 版 。

数据库版本:2017-07-05

纯真IP库

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

安装

composer require latrell/qqwry dev-master

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

使用

要使用本服务提供者,你必须自己注册服务提供者到Laravel服务提供者列表中。 基本上有两种方法可以做到这一点。

打开配置文件 config/app.php

找到key为 providers 的数组,在数组中添加服务提供者。

    'providers' => [
        // ...
        Latrell\QQWry\QQWryServiceProvider::class,
    ]

找到key为 aliases 的数组,在数组中注册Facades。

    'aliases' => [
        // ...
        'QQWry' => Latrell\QQWry\Facades\QQWry::class,
    ]

例子

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(' ') }}

qqwry's People

Contributors

latrell avatar

Watchers

puwenhan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.