The API interface since the 2011 SAE platform stable operation so far, increased the support of section 17th, welcomed the various collection of Notes limit concurrent 10
Detailed use instructions
Interface Address: Http://appyun.sinaapp.com/index.php?app=mobile&controller=index&action=api
Request method: Get
Request Parameters:
Parameter name type Required parameters Position description default value
App string is Urlparam module name (invariant) mobile
Controller string is Urlparam Controller name index
Action string is the Urlparam action name API
Mobile string is Urlparam cell phone number or number 13800138000
OUTFMT string is the desired result type JSON for Urlparam
Request Sample:
http://appyun.sinaapp.com/index.php?app=mobile&controller=index&action=api&outfmt=json&mobile= 13800138000
JSON return Example:
{"
id": "80012",
"Mobile": "13800138000",
"province": "\u5317\u4eac",
"City": "\u5317\u4eac",
"AreaCode": "010", "
Postcode": "100000",
"Operators": "\u4e2d\u56fd\u79fb\u52a8",
"card": "GSM"
}
XML Return Example:
<?xml version= "1.0" encoding= "Utf-8"?> <queryresponse xmlns=
"http://appyun.sinaapp.com/" >
<Mobile>13800138000</Mobile>
<QueryResult>True</QueryResult>
<province > Beijing </Province>
<City> Beijing </City>
<AreaCode>010</AreaCode>
< Postcode>100000</postcode>
<Operators> China Mobile </Operators>
<card>gsm</card >
</QueryResponse>
How to use
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 entire content of this article, I hope you can enjoy.