PHP Query method for IP location
The implementation method is as follows:
The code is as follows:
/**
*@ Date 2010.12.21
Note: file header [offset of first index (4byte)] + [offset address of last index (4byte)] 8 bytes
Record area [end IP (4byte)]
Summary
The IP database on the network is the most popular with the pure version, LUMAQQ also uses the pure version IP database as the basis of the IP query function. However, the document on its format is very small, and then finally found a
Original: https://redislabs.com/ebook/redis-in-action/part-2-core-concepts-2/ Chapter-5-using-redis-for-application-support/5-3-ip-to-city-and-country-lookupWhen we have collected statistical information and logs to Redis, we have collected
Originally transferred from http://hi.baidu.com/shyoung/blog/item/b0ccff03fd462481d43f7c5a.html
The complete DNS System of the DNS component consists of the DNS server, region, Parser (DNS client), and resource records, and you need to correctly
Want to convert IPV4 address to real address, must refer to IP database, commercial IP database stored in relational database, query and use is very convenient, but the cost is not individual and small companies willing to bear, So the idea of
IP is the most core protocol in the TCP/IP protocol family. All TCP, UDP, ICMP, and IGMP data are transmitted in the form of IP datagram.
IP is an unreliable protocol, that is, it does not guarantee that each IP datagram can successfully reach the
This article is a computer class of high-quality pre-sale recommendation >>>>"TCP/IP Fundamentals"Editor's recommendationThis book is an educational training and certification exam material for network engineers, as well as a textbook or reference
The installation of DNS servers and clients is briefly described in the previous section. Although there are few knowledge points involved, there are already two parts of the DNS system that are indispensable, that is, DNS servers and clients, and
How to use: Ipsearch.getaddresswithip ("202.96.128.167")
CS Class Code
Copy Code code as follows:
Using System;
Using System.Data;
Using System.Configuration;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using
Make method one, use IP138 database to query domain name or IP address corresponding geographical location.
#-*-coding:gbk-*-
import urllib2
import re
try: While
True:
ipaddr = Raw_input ("Enter IP Or Domain Name: ")
if ipaddr = =" ""
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.