开发者

Trace IP Address

I need to trace the ip address (where my website access) for op开发者_StackOverflow社区tional loading of my theme.

Explanation:

I want to add a share link to twitter and facebook in my application. i think in some countries like china; twitter is blocked. Thats why i need to check from where my site is accessing otherwise this may affect my site's performance.

How can we solve this problem in PHP?


Use GeoIP is the better way to get location infromation by ip address. You can get by this solution information as City, State, Country, Longitude, Latitude and much more like ISP name.

http://php.net/manual/en/book.geoip.php


Using PHP you can access the IP address of the visitor in the variable:

$_SERVER['REMOTE_ADDR']

Check out the following Link

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜