Download the PHP package zhuzhichao/ip-location-zh without Composer

On this page you can find all versions of the php package zhuzhichao/ip-location-zh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ip-location-zh

Ip Location Zh

Scrutinizer Code Quality Build Status Total Downloads Latest Stable Version License

数据最后更新时间为 2019-7-3, 更新时间:不定期。 数据源于: http://www.ipip.net

IPIP典型客户 ipip客户

这是一个能够通过 Ip,获取该 IP 所在的位置,例如通过 ip:171.12.10.156 可以获得是 中国河南郑州,以及中国行政区划代码(支持到市级), 同样能获得国外的地址,但是没有国内详细。

注意: 该免费数据库不提供经纬度、运营商、行政区等更详细的内容, 如果你有更多的需求可以考虑使用他们的收费服务。本包的目的是提供给需求简单, 手里没钱的程序员或者老板不舍得掏钱来获取定时更新的IP信息

国家码和邮编不是该包负责的内容, 需自行构建相关的程序

特点

  1. 不配置和使用数据库,妈妈再也不用担心配置问题了
  2. 使用简单,功能专(dān)注(yī)
  3. 使用 composer 进行安装管理,国际标准,方便快捷,即安即用,随时更新数据库

Install

这里不详细介绍安装 composer 了,大家根据 链接 自行安装吧!

composer require "zhuzhichao/ip-location-zh"

Usage

Common

可以这样来用

Laravel

对于laravel可以这样优雅的用:

1.安装该插件

2.在 config/app.php(Laravel 5.0 - 5.4)添加下面的代码,如果是 Laravel 5.5+ ,已经支持扩展包发现,不需要添加下面的代码

3.然后开始在你的项目里面使用了 Ip::find('171.12.10.156')Ip::find(Request::getClientIp())

对,很简单,只用一个方法,那就是 find

Contributing

有什么新的想法和建议,欢迎提交 issue 或者 Pull Requests

License

MIT


All versions of ip-location-zh with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zhuzhichao/ip-location-zh contains the following files

Loading the files please wait ....