PHP gets mobile phone number attribution via API
This API support 1, you can enter 11-digit mobile phone number query attribution such as: 13858861234, 2, you can enter the 7-segment query attribution such as: 1335586, 3, support number segment 13, 14, 15, 17, 18, the need for small partners can refer to.
The API interface since the 2011 SAE platform on-line stable operation to date, increased the support of section 17th, welcomed the various collection note limit concurrent 10
Detailed instructions for use
Interface Address: Http://appyun.sinaapp.com/index.php?app=mobile&controller=index&action=api
Request Method: GET
Request Parameters:
Parameter name type required argument location description default value
App string is Urlparam module name (unchanged) mobile
Controller string is the Urlparam control name index
Action string is the Urlparam action name API
Mobile string is Urlparam mobile number or number segment 13800138000
OUTFMT string is the result type JSON that Urlparam expects to get
Sample Request:
http://appyun.sinaapp.com/index.php?app=mobile&controller=index&action=api&outfmt=json&mobile= 13800138000
JSON returns an example:
?
1 2 3 4 5 6 7 8 9 10 |
{ "id": "80012", "Mobile": "13800138000", "Province": "\u5317\u4eac", "City": "\u5317\u4eac", "AreaCode": "010", "Postcode": "100000", "Operators": "\u4e2d\u56fd\u79fb\u52a8", "Card": "GSM" } |
XML Return Example:
?
1 2 3 4 5 6 7 8 9 10 11 |
13800138000 True Beijing Beijing 010 100000 Mobile Gsm |
How to use
?
1 2 3 4 5 6 |
function Getmobileinfo ($mobile) { $response = file_get_contents (' http://appyun.sinaapp.com/index.php?app=mobile&controller=index&action= Api&outfmt=json&mobile= '. $mobile) $result = Json_decode ($response, true); return $result; } |
The above mentioned is the whole content of this article, I hope you can like.
http://www.bkjia.com/PHPjc/1007640.html www.bkjia.com true http://www.bkjia.com/PHPjc/1007640.html techarticle PHP through the API to obtain a mobile phone number attribution to this API support 1, you can enter 11-digit mobile phone number query attribution such as: 13858861234, 2, you can enter the 7-segment query attribution, such as: 1335586, 3, support number segment ...