 |
|
|
 |
|
|
 |
|
|
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
hello,
Accondingly with your sw I am in the USA, actually I am in Italy, I use an Italian provider (Inet).
BYe
Luca
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
 | Error |  | Anonymous | 23:50 22 Feb '04 |
|
|
 |
|
|
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
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 |
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
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 |
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
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>
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
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.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
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!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
I had no idea this kind of database existed. I feel another ASP.NET control article on its way soon from me 
I love CodeProject, you get to find out about all these things!
-- Paul "If you can keep your head when all around you have lost theirs, then you probably haven't understood the seriousness of the situation." - David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk Sonork: 100.22446
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |