Download the PHP package jxlwqq/id-validator without Composer

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

IdValidator.php

中华人民共和国居民身份证中华人民共和国港澳居民居住证以及中华人民共和国台湾居民居住证号码验证工具(PHP Composer 版)支持 15 位与 18 位号码。

Testing StyleCI Scrutinizer Code Quality Maintainability FOSSA Status 996.icu

安装

注:如果 require 失败,解决方案见 #13

使用

440308199901101512610104620927690 示例大陆居民身份证均为随机生成的假数据,如撞车,请联系删除。 810000199408230021830000199201300022 示例港澳台居民居住证为北京市公安局公布的居住证样式号码。

验证身份证号合法性

验证身份证号是否合法,合法返回 true,不合法返回 false

获取身份证号信息

当身份证号合法时,返回分析信息(地区、出生日期、星座、生肖、性别、校验位),不合法返回 false

返回信息格式如下:

注:判断地址码是否废弃的依据是中华人民共和国行政区划代码历史数据集,本数据集的采集源来自:中华人民共和国民政部,每年更新一次。本数据集采用 csv 格式存储,方便大家进行数据分析或者开发其他语言的版本。

生成可通过校验的假数据

伪造符合校验的身份证:

fakeId() 方法有 4 个可选参数:

升级身份证号码

15 位号码升级为 18 位:

参考资料

Change Log

License

MIT


All versions of id-validator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.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 jxlwqq/id-validator contains the following files

Loading the files please wait ....