PHP implementation code to obtain the user's real IP and geographical location (Taobao IP interface)

WBOY
Release: 2016-07-25 09:00:37
Original
840 people have browsed it
PHP obtains the user's real IP address and analyzes its actual geographical location based on the Taobao IP interface. Friends in need can refer to it.

The Taobao IP library is used in this article: http://ip.taobao.com.

The code is as follows.

code==’1′){
  return false;
  }
  $data = (array)$ip->data;
return $data;
}
?>
Copy after login

>>>> Articles you may be interested in: PHP Sina interface to query IP geographical location php Tencent IP sharing plan to obtain IP geographical location php gets geographical location by IP PHP gets the geolocation code via IP Code sharing for php to obtain website location and operating system information An example reference for php to obtain geographical location through IP php gets current geographical location interface based on IP address



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!