Get the App
SLTechnology News&Howtos  ›  Development  › 

How to determine whether Unicom or Telecom can be realized by php

Shulou Source: shulou.com Published: 2022-06-02 07:13:40 10月03日 Update

Editor to share with you how to achieve php to judge Unicom or telecom, I hope you will gain something after reading this article, let's discuss it together!

Php realizes the method of judging China Unicom or China Telecom: 1, create a HTML page and verify whether the mobile phone number is correct by js code; 2, judge whether the number is Unicom or China Telecom by PHP code "public function phone_check () {...}".

This article operating environment: Windows7 system, PHP7.4 version, Dell G3 computer.

PHP determines the mobile phone number and operator (details of the attached code)

The reason is very simple. You only need to know the rules of mobile phone number and make regular judgment.

Mobile: 134,135,136,137,138,139,150,151,157 (TD), 158,159,187,188

China Unicom: 130, 131, 132, 152, 155, 156, 185, 186

Telecom: 133,153,180,189, (1349 Satcom)

HTML page

Mobile phone number attribution

Tags: Telecom Mobile China Mobile or Mobile number Code number China Mobile Mobile number aspect Article operator Page China Telecom China Unicom reply Operation number range character Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL NVidia Microsoft MariaDB Shulou Tech Info