Download the PHP package douyasi/identity-card without Composer

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

中国(大陆)公民身份证类

中国(大陆)公民身份证类包,数据来自国标 GB/T 2260-2007 (中华人民共和国行政区划代码 标准) 。

Latest Stable Version Latest Unstable Version License Total Downloads

ENGLISH README

其它语言实现版本

版本更新记录

安装说明

composer 中添加依赖:

然后在命令行窗体里执行 composer update 命令,或者参考下面直接使用 composer require 命令:

特别提示:

本插件需要使用 PDO 连接 sqlite 数据库,故需要安装和开启 pdopdo_sqlite 组件。

使用说明

Laravel 示例代码

创建ID类的实例,然后调用其对应方法。Laravel 测试路由示例:

结果集

上面测试路由将返回下面 json 数据响应:

如果身份证证号校验通过,passed 返回 true ,否则返回 false 。其它字段(如 earagenderbirthdayageconstellation )顾名思义,就不做解释了。

2.0+ 版本 getArea() 方法返回中新增 using 字段,表示行政区划代码当前是否还在使用中。如果为 1 ,说明此身份证证号前6位数字代码(也就是行政区划代码,如 420323 )仍在使用,可以新签发(非续签非补办)此行政区划代码打头的身份证;为 0 表示行政区划已经发生变更(地名可能不变),不再新签发此行政区划代码打头的身份证。

API列表

关于星座月日范围,会有上下 1-2 天的浮动,这里以维基百科资料为主。 维基百科地址: https://zh.wikipedia.org/wiki/%E8%A5%BF%E6%B4%8B%E5%8D%A0%E6%98%9F%E8%A1%93 .

数据爬虫

请参考 china-divisions 项目 crawler 目录下 readme 文件。

参考资源

特别致谢

JetBrains Logo (Main) logo


All versions of identity-card with dependencies

PHP Build Version
Package Version
Requires ext-pdo Version *
ext-pdo_sqlite Version *
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 douyasi/identity-card contains the following files

Loading the files please wait ....