Life goes on, go go go ...
Previously, there was a reference to the standard library provided by Golang: NET Package
Go Language Learning Net package (the path to go) brief aftertaste net package
func Parseip
Func Parseip (s string) IP
Parseip
Implementation Method: capture IP addresses through regular expressions to display website data ....
Friendly reminder: This method is not highly efficient. If it is used in the Web, you can use this method if it is rarely used. If it is
This method is not efficient. If it is used in the WEB, you can use this method if it is rarely used. If it is commonly used, it is recommended to use the IP library.Copy codeThe Code is as follows:# Region # obtain the real IP address and location
Convert the IP address to IP number and obtain the country
Today, I have nothing to do at home. I went online and read an article about finding a country based on the IP address. In fact, I used one for my work, but I don't know how to do it.
Next,
Today, I have nothing to do at home. I went online and read an article about finding a country based on the IP address. In fact, I used one for my work, but I don't know how to do it.
Next, I will share the translation
Php obtains all the information (such as the address, postal code, country, and latitude and longitude) of the specified IP address. Php obtains all the information (such as address, zip code, country, and latitude and longitude) of a specified
The IP address is like a phone number, but the area code is required for dialing a phone number from another country. The subnet mask is required for accessing other network segments in the network. The IP address must be classified as if the IP
This approach is not very efficient, if used in the web, if used less can be used in this way, if used, or recommend the use of IP library
Copy Code code as follows:
#region # #得到真实IP以及所在地详细信息
Get real IP and location details
Transferred from: http://www.cnblogs.com/JuneWang/p/3917697.htmlIn order to learn more about the TCP/IP protocol, recently read a lot of relevant information, collected and recorded as follows, for later use and convenient for you to learn:IP
PS: found a good article on the Internet, carried over, in case you can't find it later. At the same time the individual made a simple change. IP address, subnet mask, default gateway, what does DNS server mean?(a) Problem analysis001. Q: IP address,
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.