repat / ham-radio
Amateur Radio Call Signs Verification
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/repat/ham-radio
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.3
- repat/http-constants: ^0.1
This package is auto-updated.
Last update: 2025-10-05 13:52:46 UTC
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