 |
|
 |
Has anyone modiifed the code to work with GeoLiteCity.dat to find the cities?
|
|
|
|
 |
|
 |
I just finish my article about GeoIP custom solutions... A good beginner guide for everyone who want to build custom GEO-IP solution on IIS.
Ip ge-location - make it easy![^]
It Based on FREE, not commercial solution.
Good Luck
Alex Kucherenko
|
|
|
|
 |
|
|
 |
|
 |
Hi
Why is the European Union and Germany or Italy (for example) listed seperately? Is there a difference for the program or is "European Union" an overview of all countries IN the european union?
Regards,
Mathias
|
|
|
|
 |
|
 |
one of the best, most practical articles i have seen.
|
|
|
|
 |
|
 |
Hej
Jag har GeoIP installerat på min sida och har även Danska medlemmar, problemet är att dom Danska besökarna får svenska flaggor
Jag tog bort koden <%=strIP%> och <%=strCountryCode%> eftersom jag bara ville ha <%=strCountryName%> kvar, men annars är det som du har beskrivit och jag har hämtat hem den senaste GeoIP.dat
Hur kan det komma sig att dom Danska för en Svensk flagga, någon ide'?
Mvh/Micke
|
|
|
|
 |
|
 |
Hei,
Mest sansylig er det fordi dine danske venner bruker (anvender) en ISP som er Svensk (fx Telia).
../Per
best regards,
../Per
|
|
|
|
 |
|
 |
Hej
Tack för ditt svar, men jag har frågat och dom har en dansk leverantör.
Mvh/Micke
|
|
|
|
 |
|
 |
Hi,
Excellent software
..
|
|
|
|
 |
|
 |
hello,
Accondingly with your sw I am in the USA, actually I am in Italy, I use an Italian provider (Inet).
BYe
Luca
|
|
|
|
 |
|
 |
same for me.
Use an German Provider and no Proxy, tells me that iam in Newyork?
|
|
|
|
 |
 | Error  |  | Anonymous | 23:50 22 Feb '04 |
|
 |
Hi I'm getting,
Error: 3002 Source: GeoIP.asp line 56: File could not be opened
Any Ideas?
|
|
|
|
 |
|
 |
ref ADO Error Reference:
- 3002 - adErrOpeningFile
- "File could not be opened. A misspelled file name was specified, or a file has been moved, renamed, or deleted. Over a network, the drive might be temporarily unavailable or network traffic might be preventing a connection."
so, check your paths
../Per
|
|
|
|
 |
|
 |
I have tryed the code on one of my sites http://www.publicatiionline.ro and it throw me an undocumented error:
Provider error '80070057'
The parameter is incorrect.
/GeoIP.asp, line 124
Also, the db has changed now, its name is: GeoIPCountryCSV.csv. Is that influencing the code?
PS. Forgot to mention that I did change the path and file names accordingly.
Zaboss
| www.LearningSystems.ro | www.CursuriOnline.ro | www.TestariOnline.ro | www.PublicatiiOnline.ro | www.RecrutariOnline.ro |
|
|
|
|
 |
|
 |
Hi,
You cann't use the GeoIPCountryCSV.csv. Instead, download GeoIP.dat.gz, and unzip it using WinZip.
Having access to GeoIPCountryCSV.csv is nice though, you can use it to create the database in Access, MS SQL, ....
../Per
|
|
|
|
 |
|
 |
Thank you Per, that was quick! Works excelent now! Thanks again and Happy New Year (La multi ani! - .ro version )!
Zaboss
| www.LearningSystems.ro | www.CursuriOnline.ro | www.TestariOnline.ro | www.PublicatiiOnline.ro | www.RecrutariOnline.ro |
|
|
|
|
 |
|
 |
Based on:
http://map.geoup.com/geoup?template=CityName, http://map.geoup.com/geoup?template=RegionName,
and http://map.geoup.com/geoup?template=CountryName,
you may locate users' city, region and country. Upload the following to your IIS. It should work. And it would be nice if there is a way to check the availability of an external site such as "http://map.geoup.com/".
<%@ LANGUAGE="VBScript" %>
<%
Response.Buffer = True
On Error Resume Next
Dim yourIP
yourIP = request.servervariables("REMOTE_ADDR")
Function parseCityRegion(s, labS, dStr1, dStr2)
s = Trim(s)
if s="Unknown" OR Instr(1, s, labS, 1)<>1 then
parseCityRegion = "Unknown"
Exit function
end if
Dim i1, i2
i1 = Instr(1, s, dStr1, 1)
if i1=0 then
parseCityRegion = "Unknown"
Exit function
end if
i2 = Instr(i1+Len(dStr1), s, dStr2, 1)
if i1>0 and i2>i1 then
parseCityRegion = Mid(s, i1+Len(dStr1), i2-i1-Len(dStr1))
else
parseCityRegion = "Unknown"
end if
end function
Function GetHTML(strURL)
GetHTML = "Unknown"
On Error Resume Next
Dim objXMLHTTP, strReturn
Set objXMLHTTP = SErver.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", strURL, False
objXMLHTTP.Send
If Err.Number=0 Then
if objXMLHTTP.statusText="OK" then strReturn = objXMLHTTP.responseText
end if
Set objXMLHTTP = Nothing
GetHTML = strReturn
End Function
Function cityRegionCountry()
Dim cityStr, regionStr, countryStr
cityStr = "Unknown"
cityStr = GetHTML("http://map.geoup.com/geoup?template=CityName")
cityStr = parseCityRegion(cityStr, "document.write(", "'", "'")
if cityStr="Unknown" then
cityRegionCountry = "Unknown_Unknown_Unknown"
exit function
end if
regionStr = "Unknown"
regionStr = GetHTML("http://map.geoup.com/geoup?template=RegionName")
regionStr = parseCityRegion(regionStr, "document.write(", "'", "'")
if regionStr="Unknown" then
cityRegionCountry = "Unknown_Unknown_Unknown"
exit function
end if
countryStr = "Unknown"
countryStr = GetHTML("http://map.geoup.com/geoup?template=CountryName")
countryStr = parseCityRegion(countryStr, "document.write(", "'", "'")
cityRegionCountry = vbcrlf & " Your city: " & cityStr & vbcrlf & " Your region: " &
regionStr & vbcrlf & " Your country: " & countryStr
End Function
%>
<HTML><BODY>
<Form>
<textarea cols=50 rows=10>
<%=cityRegionCountry()%>
</textarea>
</form>
</BODY></HTML>
|
|
|
|
 |
|
 |
I know, ASPToday had an article on the same subject some time ago (http://www.asptoday.com/content.asp?id=1931), it inspired me to make GeoIP.asp
The problem with your technique is speed, it's very slow when you have to check many addresses, but if speed isn't an issue, it's nice
If you need speed and more than country information (and you can afford it), you should take a look at GeoIP City
Best regards,
Per
|
|
|
|
 |
|
 |
Hi Per, You are right that it's very slow to check many addresses. Is the free GeoIP.dat only capable of showing "country" ? Thanks, Gary Y
|
|
|
|
 |
|
|
 |
|
 |
Is your geoup script supposed to run on the server? If yes, are you sure it will return geo details of the client -- visitor? I don't think so... the server sends request from it's own IP address and map.geoup.com returns the geo data for this IP address, not for the client's one.
|
|
|
|
 |
|
|
 |
|
 |
This is an excellent tool. I only wish that the ASP stuff was written in JScript instead of VBScript. This is my first occasion of giving VB-anything a 5 rating. Good job!
|
|
|
|
 |
|
 |
This is a good idea. Congratulations.
|
|
|
|
 |
|
 |
Thank you
You should also take a look at http://www.codeproject.com/useritems/CountryListBox.asp
br,
Per
|
|
|
|
 |