First go to the next latest innocent IP database, and then follow the following operations:
1. Run the pure QQIP database, click decompress and enter the file name. For example, OK, you will get a TXT file.
2. Open ACCESS, Tools - Custom, Commands tab, and drag the import options to the toolbar above.
3. Build a library, build a table, and four fields
Startip Type: Text (IP segment information of related cities)
Endip Type: Text (IP segment information of related cities)
Country Type: Text (relevant city name)
ReUrl Type: Text (the city path you want to jump to, such as: Beijing)
4. Click the import button, select the text file in the file type, find the file you just exported, and import it into the table you just created~
The operation converts the real IP into a number, for example, the IP segment in Beijing is: 1.1.0.0 -- 1.1.0.255
Startip: 1*256*256*256+1*256*256+0*256+0 = 16842752 (This number is the final one to be placed in the database)
Endip: 1*256*256*256+1*256*256+0*256+255 = 16843007 (This number is what you will eventually put in the database)
You can use the program to batch process. If you don’t know what to do and don’t have time (like me), you can go directly to the next IP library of Dynamic Network. It has been processed. The following is the program part:
user_ip = ("REMOTE_ADDR") ''Get visitor IP
userip_ary=split(user_ip,".")
tmp_userip=userip_ary(0)*256*256*256+userip_ary(1)*256*256+userip_ary(2)*256+userip_ary(3) '' Convert IP to number according to regulations
‘Find out the city where the user's IP belongs from the database
set rs=("")
sql="select * from ip where Startip<="&tmp_userip&" and Endip>="&tmp_userip
sql,conn,1,1
if then
"" 'If there is no city or the IP cannot be recognized, then go to the home page, and you can also specify the page
else
rs("ReUrl") 'If there is any go to the specified page
end if
set rs=nothing
Put the above program on your virtual host's default access homepage! Or in other pages (of course, you also need to set the default access file in the virtual host control panel) OK
1. Run the pure QQIP database, click decompress and enter the file name. For example, OK, you will get a TXT file.
2. Open ACCESS, Tools - Custom, Commands tab, and drag the import options to the toolbar above.
3. Build a library, build a table, and four fields
Startip Type: Text (IP segment information of related cities)
Endip Type: Text (IP segment information of related cities)
Country Type: Text (relevant city name)
ReUrl Type: Text (the city path you want to jump to, such as: Beijing)
4. Click the import button, select the text file in the file type, find the file you just exported, and import it into the table you just created~
The operation converts the real IP into a number, for example, the IP segment in Beijing is: 1.1.0.0 -- 1.1.0.255
Startip: 1*256*256*256+1*256*256+0*256+0 = 16842752 (This number is the final one to be placed in the database)
Endip: 1*256*256*256+1*256*256+0*256+255 = 16843007 (This number is what you will eventually put in the database)
You can use the program to batch process. If you don’t know what to do and don’t have time (like me), you can go directly to the next IP library of Dynamic Network. It has been processed. The following is the program part:
user_ip = ("REMOTE_ADDR") ''Get visitor IP
userip_ary=split(user_ip,".")
tmp_userip=userip_ary(0)*256*256*256+userip_ary(1)*256*256+userip_ary(2)*256+userip_ary(3) '' Convert IP to number according to regulations
‘Find out the city where the user's IP belongs from the database
set rs=("")
sql="select * from ip where Startip<="&tmp_userip&" and Endip>="&tmp_userip
sql,conn,1,1
if then
"" 'If there is no city or the IP cannot be recognized, then go to the home page, and you can also specify the page
else
rs("ReUrl") 'If there is any go to the specified page
end if
set rs=nothing
Put the above program on your virtual host's default access homepage! Or in other pages (of course, you also need to set the default access file in the virtual host control panel) OK