devtobi / gsm-number-prefixes
A php library to determine the network provider for various GSM mobile numbers.
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 1
pkg:composer/devtobi/gsm-number-prefixes
Requires
- php: >=7.1
 
Requires (Dev)
- phpunit/phpunit: 6.*
 
This package is not auto-updated.
Last update: 2025-10-25 15:01:22 UTC
README
Library for identifying mobile numbers network operators
A simple library that helps identify the current network operator of a phone number based on its prefixes.
Just install the package, add the config and it is ready to use!
Requirements
- PHP >= 7.1
 
Installation
composer require devtobi/gsm-number-prefixes:dev-master
Usage
Get network operator of a phone number
use devtobi\GsmNumberPrefixes\GsmNumberPrefix;
$gsmNetworkIdentifier = new GsmNumberPrefix();
$gsmNetworkIdentifier->getNetworkProvider($phone_number);
Available Response
- mtn
 - airtel
 - glo
 - 9mobile
 - starcomms
 - visafone
 - multilinks
 - zoom
 - ntel
 - smile
 - unknown
 
Credits
- Ubah Ebuka for the awesome https://github.com/god-of-speed/GSM-Number-Prefixes library