DEV Community

Leonel Elimpe
Leonel Elimpe

Posted on • Originally published at leonelngande.com on

Detect The Carrier/Mobile Network Of A Phone Number With Javascript, PHP, Java, C++, Ruby, etc

For a long time, I’ve struggled with this problem of determining the Mobile Network a given phone number belongs to. Today I found out Google’s libphonenumber library (or any of it’s third party ports for other languages) have this functionality built-in.

Specifically, the PhoneNumberToCarrierMapper functionality. I am currently using this with the PHP port here.

While researching this today, I equally came across this document which describes the breakdown of phone numbers by Carrier in Cameroon (MTN, ORANGE, and NEXTTEL). You can equally check it out if you intend to write functionality for a more specific use case.

Top comments (0)