Erkennen aus welchem land man kommt

meilon

Erfahrenes Mitglied
Hi,
wie kann man erkennen, aus welchem Land der aktuelle Besucher kommt, bzw, von wo er sich eingeloggt hat? Ich denke, das sowas über IP's geht, aber wo soll ich nachschlagen? Gibt es da ein Verzeichnis oder gibt es Strickte regeln, wie die ersten beiden Abschnitte der IP, womit ja der ISP erkannt werden kann.

mfg
Klink
 
Eine Möglichkeit ist natürlich das ganze über die IP zu regeln, jedoch gibt es glaub ich für Deutschland mehrere hundert Adressräume der unzähligen ISPs und wie gesagt, das nur für Deutschland.

Ich weiss ja nicht in welchen Umfang das gehen soll und wie genau es stimmen muss, aber als Notlösung kann man doch auch die Sprache des Browsers nehmen. Ich schätze mal das die Sprache des Browser zu 95% mit dem Land des Users übereinstimmt.

Wenn du ne Datenbank mit allen ISPs und deren Adressräumen hast, bzw aufgebaut hast, interessant wäre das schon :D

MfG
Andreas

EDIT:

Mir fällt direkt noch was ein: Schau nach dem HostName des Users und such nach t-online.de tnet (oder was es da alles für T-Online Hostnames gibt), dann auch aol..
Ach, da hamwa die kacke, Aol User (mein BeileidI) haben ja meines Wissen auch AOL.com im Hostname, ok das kannste vergessen.
 
Original geschrieben von Mairhofer
Ich weiss ja nicht in welchen Umfang das gehen soll und wie genau es stimmen muss, aber als Notlösung kann man doch auch die Sprache des Browsers nehmen. Ich schätze mal das die Sprache des Browser zu 95% mit dem Land des Users übereinstimmt.
Mein Firefox ist in Englisch und ich bin kein Engländer - schlechte Idee denke ich :)

Ich bin mal vor langer Zeit auf einer Homepage gelandet wo mir mein Herkunftsland angezeigt wurde und ich dächte das wurde mit PHP realisiert. Aber leider war damals noch nichtmal ansatzweise mit PHP in Berührung gewesen und hab die Wichtigkeit dieser Seite verkannt :(
(Warum ich das dann erzähle? Damit gesagt ist das es auch möglich ist.)

Grad gefunden:
http://www.hotscripts.com/Detailed/22093.html
 
Zuletzt bearbeitet:
@Mairhofer die Erste: Ich habe mich bei php.net schlau gemacht und [phpf]get_browser[/phpf] gefunden. Will aber nicht. Liegt an der BrowsCap.ini, die ich wohl nicht habe und nicht weiß wohin damit.

@_voodoo: schau ich mir gleich mal an...

@Mairhofer die Zweite: Ich habe mal nen Vergleich gemacht: Deine und meine IP angeguggt: Bei Adress steh mal D-PLZ und mal Germany mal Deutschland, also Ripe ist zwar informativ, aber das auszulesen wäre irgendwie schwierig! Mal guggen!
 
Original geschrieben von _voodoo
Mein Firefox ist in Englisch und ich bin kein Engländer - schlechte Idee denke ich :)

Kein Hindernis, Du kannst die Browsersprache locker auf de_DE ändern ...
Außerdem gibt es Extensions dafür ...
 
das Scipt, was _vodoo Vorgeschlagen hat, kostet 39.99 Dollar, nicht mein Fall, aber trotzdem Genial.
 
Price: Free (GPL)
Erklär mir woher die woher die 40$ sollen kommen .... :)

Ich probier grad das Ding zum laufen zu bekommen aber ich hab grad keine MySql DB auf meinem Webspace :(

Hier mal ein Auszug aus dem Script-readme:
- This is a script designed to fit into your website and redirect/restrict access to visitors based on their country, or just to get the visitor`s country and country details, like population, currency and flag image path.
- The script should be included in a set of pages on your website so it could redirect visitors to those pages acordingly to the redirection rules.
- In this distribution is included a free IP2Country database (75% accurate) for 179 countries, with 16934 records.
- The country code of the visitors is saved in a cookie or a session variable in order to avoid searching the IP database repeatedly.
- With this script you can create as many "Redirection Nodes" as you want. On the same website, some pages could have different redirection rules than the others, by including them in different Redirection Nodes.
- For each Redirection Node, each country (or IP database) has a Redirection Rule (a link associated with it). If the visitor`s IP is in an IP database, he is redirected to the redirection link associated with it, or if this one is blank, to the default redirection link. If this default redirection link is blank too, the page is loaded. If the visitor`s country has no Redirection Rule specified, he is redirected to the default 'reject' link or if this one is blank, the page is loaded.
- It features an IP exception list, where you can place your trusted IPs, and a passwords/codes list for exceptions.
- The IP databases supported are MySql full, MySql split, Plain text full, Plain text split - all available at http://rv.web-heaven.com . The Plain text databases can have both IP numbers (3240323434) and IP addresses (192.168.0.1).
- If you consider country IP databases just as "Redirection IP databases", you`ll be able to redirect/restrict access to your website based on a list of IP addresses, not necesarily from the same country. That`s why the script can also read IP databases with IP addresses (192.168.0.1), so you could easily create your custom IP database.
- It also creates an array with visitor`s country information, and the path to it`s flag GIF file, than you could use in your own scripts;

http://www.hotscripts.com/cgi-bin/dload.cgi?ID=22093
 
hoppala, naja, steht oben auf der Seite, wenn du auf die Homepage vom Scipt gehst. ka was dan bedeutet, ist ja auch egal, jetzt werd ich erstmal die Datenbank in mein MySQL drücken...
 

Neue Beiträge

Zurück