Free mobile phone number attribution to the API query interface and PHP use instance to share
Recently in the national Industry classified information Web site, need to use the mobile phone number attribution to display function, so the shuttle in
recently in the National Industry Classification information web site, need to use the mobile phone number ownership display function, so the shuttle in the major authoritative sites between the API to steal the interface address. Share it out,
A practical PHP function code, regular expression verification of the correctness of the phone number and query phone number attribution, the following look at the function of the specific code:
View SOURCEPRINT?01
02//Mobile phone Number
Copy CodeThe code is as follows:
Mobile phone number Verification
function Checkmobilevalidity ($mobilephone) {
$exp = "/^13[0-9]{1}[0-9]{8}$|15[012356789]{1}[0-9]{8}$|18[012356789]{1}[0-9]{8}$|14[57]{1}[0-9]$/";
if (Preg_match ($exp, $mobilephone))
Copy Code code as follows:
Mobile phone number Verification
function Checkmobilevalidity ($mobilephone) {
$exp = "/^13[0-9]{1}[0-9]{8}$|15[012356789]{1}[0-9]{8}$|18[012356789]{1}[0-9]{8}$|14[57]{1}[0-9]$/";
if (Preg_match ($exp, $mobilephone)
1, Taobao
API Address: http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel= mobile phone number
Parameters:
Tel: mobile phone number
Back: JSON
2, Pat
API Address: http://virtual.paipai.com/extinfo/GetMobileProductInfo?mobile= mobile phone
web| Free | design
Web designers with a large budget backing can get whatever resources they need to put their imaginations into the web experience. They can hire professional photographers to make compelling photos; You can ask the best HTML and
Free Web design resources for easy accessWeb Designers with a large budget can obtain all the resources they need to put their imagination into the web experience. They can hire professional photographers to Create Compelling photos; they can ask
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.