PHP Classes

MSISDN PHP Library: Validate and find the operator of a phone number

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2021-11-28 (19 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 58 This week: 27All time: 10,037 This week: 6Up
Version License PHP version Categories
msisdn 1.0.0BSD License5PHP 5, Wireless and Mobile, Validation
Description Author

This class can validate and find the operator of a phone number.

It takes a telephone MSISDN number and checks if it is valid.

The class can also determine if the number is of known telephone company operator company.

Innovation Award
PHP Programming Innovation award nominee
November 2021
Nominee
Vote
MSISDN is a number that is useful to identify a phone number from any country in the world.

This class can determine if a phone number is of a given operator company.

Manuel Lemos
Picture of Allan Kibet
Name: Allan Kibet <contact>
Classes: 3 packages by
Country: Kenya Kenya
Innovation award
Innovation award
Nominee: 1x

Details

msisdn

This is a basic PHP 7 package that basically enforces the standard number format of 2547 prrefix of Kenyan based mobile numbers. The clean method also checks for the validity of an MSISDN number if given as 07XX, 7XX or 2547XX formats. Prefixes are updated courtesy of https://en.wikipedia.org/wiki/Telephone_numbers_in_Kenya

Installation

Download the package zip, extract and run

composer install

Alternatively run:

composer require allan/msisdn

Examples

Get Channel

use Msisdn\Utility;
include 'vendor/autoload.php';

var_dump(Utility::channel(254720000000)); // string(9) "SAFARICOM"

Clean MSISDN

use Msisdn\Utility;
include 'vendor/autoload.php';

var_dump(Utility::clean("0720000000")); // int(254720000000)
  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageMsisdn (1 file)

  Files folder image Files  /  src  /  Msisdn  
File Role Description
  Plain text file Utility.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:58
This week:27
All time:10,037
This week:6Up
For more information send a message to info at phpclasses dot org.