PHP via API to get mobile phone number attribution, API mobile number _php Tutorial

Source: Internet
Author: User

PHP API to get mobile phone number attribution, API mobile phone number


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:

{  "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"?> 13800138000
 
    
  
   
  
      
  
   
    
   True
  
     
  
   
    
   Beijing
  
     
  
   
    
   Beijing 010 100000
  
     
  
   
  
     
  
   
    
   China
  Mobile
     
  
   
    
   GSM
  
   
 
  

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 whole content of this article, I hope you can like.

http://www.bkjia.com/PHPjc/1008009.html www.bkjia.com true http://www.bkjia.com/PHPjc/1008009.html techarticle PHP through the API to get mobile phone number attribution, API mobile phone number This API interface since the 2011 SAE platform on-line stable operation to date, increased the support of section 17th, welcome a variety of acquisition note limit concurrency 1 ...

  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.