Global IP Address Query full version

Source: Internet
Author: User
Tags query version
IP address global IP address query full version



Suddenly in a certain website to see IP address query, so whim made a. This is the use of ASP query the global IP address program, because the class-like use of ASP query IP speed is not very ideal, I am using the Macro blog macro IP address database, but it has been improved.

I passed the test on the win98+pws+access2000, the effect is more ideal.

Database design in the proportion of a software, no exaggeration to say accounted for 60%, although this is a small program, but also get a certain embodiment.

There are any mistakes or suggestions please be sure to send me e-mail:ljz811@163.com, I do not understand the "hunt" and other similar algorithms, Welcome to Exchange, thank you!

All right, cut the crap, let's go.

1, turn Wry.dll for. mdb because we want to optimize the database (for our use), we recommend doing this:

Change the file to Wry.xls and open it in Excel.

Create a new table IP in Access

Field Name Type length description

------------------------------------------------------------------------------------------------------------

ID Auto Number

NEWID number 5 StartIP first three digits

Seconded number 5 StartIP Part II three digits

StartIP text 20 Start IP segment

EndIP text 20 Stop IP segment

Country text the country or province where the IP is located

Local text IP location of this segment



Copy startip/endip/country/local four fields from Excel to access, the ID is automatically added, and for newid and secondid of course we can't add it by hand.

<!--#include file= "dbpath.asp"-->



<%

Sqlcmd= "SELECT * from IP"

' Recommended to use sqlcmd= ' select * from Ipwhere id>= value 1 and id< value 2 ' because it takes a lot to add a resource to about 10,000 data at a draught

Set Rs=ip.execute (sqlcmd)

Do as not rs.eof

Fir=left (RS ("StartIP"), 3)

Sec=mid (RS ("StartIP"), 5, 3)

sqlcmd3= "Update IP set newid= '" &str& "', secondid= '" SEC ""

Ip.execute sqlcmd3

Rs.movenext

&



Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.