repat/ham-radio
Composer 安装命令:
composer require repat/ham-radio
包简介
Amateur Radio Call Signs Verification
README 文档
README
ham-radio is a library for quickly validating the format of a call sign by the rules of the country and also run a check against the official public database, e.g. by the FCC in the US.
Installation
$ composer require repat/ham-radio
Example
$us = new US; $us->verifyCallSign('KN6DZC'); // returns: [ // "Response" => [ // "Licenses" => [ // "License" => [ // "licName" => "...." $us ->validateCallSign('KN6DZC'); // returns: true
Supported Countries
- US
Contribute
- Fork the project
- Create a new class that
extends Helper - Name the class after the ISO3166 country code
- Add a function
regex() : stringthat returns a regular expression to validate the call sign format. - Add a function
verifyCallSign(string $callSign) : array. With$this->clientyou get aGuzzleHttpclient for making API calls. I also pulled inrepat/http-constantsfor checking HTTP status codes in the response. In case the API returns XML, check out$this->xml2array(). A json response could be returned byjson_decode($response, true).
License
- MIT, see LICENSE
Version
- Version 0.1
Contact
repat
- Homepage: https://repat.de
- e-mail: repat@repat.de
- Twitter: @repat123
- KN6DZC
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-31