PHP Gets the IP address of the regional issue
http://hi.baidu.com/sslook_com/item/3e74cd13381f838c89a95637
According to the above content test, the content of the query is: Address
Ask under, why this query out only two words, normal should be Shanghai Telecom, or other related content. IP libraries are also up-to-date.
------Solution--------------------
If you want to get an IP address, there are many interfaces that can be directly adjusted such as Sina.
If you want to study the code, I estimate 1. No IP 2 is available. There's a problem with the code.
------Solution--------------------
Explore
Is there a problem with getting the IP address at the top?
I echo $xp _userip; I can't get anything.
------Solution--------------------
What is Echo $xp _userip? The variables you define yourself?
Get IP, should be echo $_server["REMOTE_ADDR"]; Gets a result similar to 192.168.0.0.
If you need to convert to "Shanghai Telecom" style, you need to download a dedicated database, or use the API query.
------Solution--------------------
Explore
$XP _userip This place is not wrong, has been verified, you can get an IP address.
In addition, now using an online recommended IP library, what do you mean by the specific data? API method I know, now I want to learn this method.
Also please know the friend to help answer, because the online basically collect this method, do not know how they are successful, should not everybody collects a wrong method.
------Solution--------------------
How is it possible, I can get to this side, you are carefully examined again.
Results: 119.75.218.70
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.