New improvements to myforum.dk - Posted (1551 Views)
Junior Member
i011877
Posts: 169
169
Hey there

Yet again many changes to www.myforum.dk To many to mention, so go have a look for yourself cool
User:testuser
Pass:testuser

active_users.asp I have searched the forum for anything similar to the 'MOD' i have made, but without luck. It shows the country of origin for visitors, with a small flag. Mouseover the flag to see the name of the country and ip.
Well, just wanted to show you, as I have not seen anything similar elsewhere.
Preview
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
Nice mod! How do you determine the country? Is it based on a DNS query?<
Posted
Junior Member
i011877
Posts: 169
169
Well, it's actually determined by IP, which is fairly easy to get from visitors. All ip's belong to a specific region or country. IP is then converted to Long-IP with a formula, then it looks in DB for country or region with that number. Each number then corresponds to a name e.g. DENMARK. Then it picks the flag for that country and displays it.
Hmm kinda hard to explain smile
I only tried this with MSSQL, but it will work on mysql as well.

<
Posted
Forum Admin
HuwR
Posts: 20611
20611
FYI IP ranges although generally country specific, may not necessarily indicate the actual country of the visitor as some ISP's assign IP's which may not relate to the users physical location (AOL is a classic example)<
Posted
Senior Member
bobby131313
Posts: 1163
1163
I have 2 members in France whose IP traces to Germany because thier ISP is Deutsche Telekom AG which seems to have subsidiaries in several countries.<
Posted
Junior Member
i011877
Posts: 169
169
Yea well, it's not a bulletproof addition.smile
I guess if several users from different regions logged in with my 'testuser', it would not show the correct country.
For a short period, I have enabled active users for non-members. Check to see if your flag is right bigsmile
I'm happy if I can get most of them right, so prove me wrong...wink
-Bobby, have your 2 members visit, to check if their flag is the right one.<
Posted
Forum Admin
HuwR
Posts: 20611
20611
well, I'm not on aol and know that my IP is a uk ip, so there is no point smile, I was merely pointing out that you can not assume that they are correct, you don't have any choice in whether your code is right or not, that is entirely up to the ISP when it doles out from its ip pool.<
 
You Must enter a message