Collect exercise (9) php to get the mobile phone number home location. In the afternoon, I saw a friend in the group, so I took a look. It is found that the phone number is provided by the home location query. Every major website took the company's interface, so I saw a friend in the group in the afternoon, so I looked at it a little. It is found that the phone number is provided by the home location query. Every major website has taken the company's interface, so I also want to see how to obtain the information I need. there is no free interface for online mobile phones, you can only send a request to the phone's home location on his website ....... this method is meaningless.
As a result, I continued to find a solution on m.showji.com (mobile internet ).
There is an api interface in which you can directly obtain the mobile phone number information, the red is...
Http://api.showji.com/Locating/www.showji.com.aspx? M = & output = json & callback = querycallback
:.
You can remove the following when using it, or you have to intercept it.
Header ("content-type: text/html; charset = utf-8"); $ url =" http://api.showji.com/Locating/www.showji.com.aspx "; $ CellPhoneNumber =" 13530552275 "; $ setting_array = array ('http' => array ('timeout' => 5, 'method' => 'GET ', 'protocol _ version' => '1. 1 ', 'header' => "User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7 \ r \ n ". "Host: api.showji.com \ r \ n ". "Accept-Language: zh-cn, zh; q = 0.8 \ r \ n ". "Accept: */* \ r \ n ". "Referer: http://m.showji.com/ \ R \ n ". "Connection: keep-alive \ r \ n"); $ headers = stream_context_create ($ setting_array); // $ jsons = file_get_contents ($ url. "? M = ". $ cellPhoneNumber." & output = json ", FALSE, $ headers); // if this is enabled, 10 s $ jsons = file_get_contents ($ url ."? M = ". $ cellPhoneNumber. "& output = json"); // directly open less than $ cellPhoneInfo = json_decode ($ jsons, true); print_r ($ cellPhoneInfo); // echo file_get_contents (" http://apps.qiyigoo.com/telsearch/get_tel.php?_=1370366237601&do=get_tel_info&teltype=phone&phone=13530552275&1370366237599 ");
Of course, there is also an interface, but the returned information is a little small, it returns the city, card information.
The red color is blue, and you must replace it yourself when you request it ..
Http://apps.qiyigoo.com/telsearch/get_tel.php? _ = & Do = get_tel_info & teltype = phone & phone = &
Then, I took a look. It is found that the phone number is provided by the home location query. Every major website has taken the company's interface, so I...