PHP implements the mobile phone home location query API interface. This API has not been tested on this site. After the webmaster tests, it will be updated immediately. Stay tuned. Thank you for your support! This is mainly implemented using curl. you need to enable php's support for curl .? Phpheader (Conten this API has not been tested on this site. After the webmaster tests, it will be updated immediately. Stay tuned. Thank you for your support!
This is mainly implemented using curl. you need to enable php's support for curl.
Header ("Content-Type: text/html; charset = utf-8 ″);
If (isset ($ _ GET ['Number']) {
$ Url = 'http: // webservice.webxml.com.cn/webservices/mobilecodews.asmx/getmobilecodeinfo ';
$ Number = $ _ GET ['Number'];
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, $ url );
Curl_setopt ($ ch, CURLOPT_POST, true );
Curl_setopt ($ ch, CURLOPT_POSTFIELDS, "mobileCode = {$ number} & userId = ");
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true );
$ Data = curl_exec ($ ch );
Curl_close ($ ch );
$ Data = simplexml_load_string ($ data );
If (strpos ($ data, 'http ://')){
Echo 'mobile phone number format error! ';
} Else {
Echo $ data;
}
}
?>
Author: Ahe
Bytes. After the webmaster tests, it will be updated immediately. Stay tuned. Thank you for your support! This is mainly implemented using curl. you need to enable php's support for curl. ? Php header (Conten...