Download the PHP package chinayin/ip2region without Composer

On this page you can find all versions of the php package chinayin/ip2region. 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 ip2region

ip2region SDK for PHP (定期更新数据版)

Author Latest Version Total Downloads php 7.1+

Installation

运行环境要求 PHP 7.1 及以上版本,以及cURL

定期更新数据版

特点:xdb数据封装在composer包内,数据会定期更新

composer require chinayin/ip2region

官方原生查询包

特点:包更小,数据路径自定义

使用方法:github.com/chinayin/ip2region-core

Quick Examples

完全基于文件的查询

备注:并发使用,每个线程或者协程需要创建一个独立的 searcher 对象。

缓存 VectorIndex 索引

如果你的 php 母环境支持,可以预先加载 vectorIndex 缓存,然后做成全局变量,每次创建 Searcher 的时候使用全局的 vectorIndex,可以减少一次固定的 IO 操作从而加速查询,减少 io 压力。

备注:并发使用,每个线程或者协程需要创建一个独立的 searcher 对象,但是都共享统一的只读 vectorIndex。

缓存整个 xdb 数据

如果你的 PHP 母环境支持,可以预先加载整个 xdb 的数据到内存,这样可以实现完全基于内存的查询,类似之前的 memory search 查询。

备注:并发使用,用整个 xdb 缓存创建的 searcher 对象可以安全用于并发。


All versions of ip2region with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
chinayin/ip2region-core Version ^2.0
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 chinayin/ip2region contains the following files

Loading the files please wait ....