Loading...
web2.0

Geo localisation par IP

Si vous désirez connaitre la provenance de vos visiteurs, voici deux méthodes pour geo localiser. Bien sûr ce positionnement n’est pas très précis car l’IP dépend de votre FAI, mais la localisation reste intéressante surtout si l’on a des visiteurs du monde entier.

Méthode I en javascript via les API Google : pour obtenir une API KEY

Step 1: Charger Google AJAX API script

<script type="text/javascript" src="http://www.google.com/jsapi?key=API_KEY_GOES_HERE"></script>

Step 2: Extraire la localisation par google.loader.ClientLocation

if(google.loader.ClientLocation)
{
	visitor_lat = google.loader.ClientLocation.latitude;
	visitor_lon = google.loader.ClientLocation.longitude;
	visitor_city = google.loader.ClientLocation.address.city;
	visitor_region = google.loader.ClientLocation.address.region;
	visitor_country = google.loader.ClientLocation.address.country;
	visitor_countrycode = google.loader.ClientLocation.address.country_code;
}
else
{
	// pas trouve
}

Deuxième méthode II en PHP :

< ?php		
	 $IpAddress=$_SERVER["REMOTE_ADDR"];
	 $adress = 'http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress='.$IpAddress;
	 $tags = get_meta_tags($adress);
print $tags['city'];  // city name
print $tags['country'];  // country name
?>

44 comments
  1. yeezy

    Needed to post you a bit of note to finally say thanks a lot yet again on your gorgeous techniques you’ve featured on this page. This has been quite particularly generous with people like you to supply without restraint all that numerous people could have offered for sale as an electronic book to get some money on their own, most importantly given that you could have done it in case you considered necessary. These creative ideas likewise acted like the good way to be sure that many people have the identical zeal similar to my very own to know significantly more regarding this problem. Certainly there are some more enjoyable situations in the future for individuals who find out your site.

  2. supreme clothing

    I would like to point out my respect for your kind-heartedness giving support to individuals who require help on that idea. Your personal commitment to getting the solution all through has been exceptionally invaluable and have continuously encouraged guys and women just like me to get to their dreams. Your personal warm and friendly recommendations can mean a great deal a person like me and additionally to my peers. Regards; from each one of us.

  3. kobe shoes

    I really wanted to post a brief remark to say thanks to you for the great hints you are posting here. My time-consuming internet look up has now been paid with pleasant insight to talk about with my family members. I would admit that many of us readers actually are undeniably blessed to be in a fine website with very many wonderful individuals with insightful techniques. I feel truly blessed to have used the web pages and look forward to tons of more fabulous minutes reading here. Thanks again for everything.

  4. pg 1

    I want to point out my affection for your generosity for individuals that really need help with this important concept. Your very own dedication to passing the solution all around had been remarkably informative and has regularly empowered some individuals much like me to attain their dreams. Your personal useful facts denotes much a person like me and even more to my mates. Warm regards; from each one of us.

  5. pg shoes

    I am also writing to let you be aware of what a outstanding experience my child had reading through yuor web blog. She realized plenty of details, including how it is like to have a great giving nature to make men and women with no trouble learn about certain multifaceted topics. You actually exceeded readers’ desires. I appreciate you for offering these beneficial, trustworthy, revealing and as well as fun tips on this topic to Tanya.

  6. yeezy supply

    I would like to show thanks to the writer for rescuing me from this type of scenario. After surfing throughout the the web and coming across solutions which are not helpful, I figured my entire life was over. Being alive devoid of the solutions to the difficulties you’ve fixed by means of this guideline is a critical case, and the ones which might have adversely affected my entire career if I had not encountered your site. Your own personal capability and kindness in playing with everything was very helpful. I don’t know what I would’ve done if I hadn’t discovered such a thing like this. It’s possible to at this point relish my future. Thanks very much for the reliable and effective help. I won’t think twice to propose your blog to any individual who should get tips about this problem.

  7. kyrie 5

    I precisely had to say thanks all over again. I do not know the things that I might have sorted out in the absence of these pointers discussed by you concerning such subject. It absolutely was a very scary dilemma in my opinion, nevertheless being able to see the very specialized mode you processed the issue made me to jump for fulfillment. Extremely grateful for the support and in addition hope you are aware of a great job that you’re putting in training many people through the use of your site. I am certain you’ve never met all of us.

  8. lebron james shoes

    Needed to post you the tiny observation to thank you yet again over the fantastic techniques you have shared here. It’s quite unbelievably generous with you to convey unhampered all many individuals might have supplied for an e book in making some cash on their own, most importantly considering that you might well have tried it if you wanted. The tricks in addition worked to be the good way to be sure that other people online have the identical dream just as my own to grasp way more when it comes to this issue. I am certain there are a lot more enjoyable times up front for those who look over your website.

  9. supreme clothing

    I have to point out my affection for your generosity for folks who require help on your concern. Your special commitment to passing the message all over came to be extremely informative and has really encouraged people like me to attain their dreams. Your entire insightful instruction denotes much to me and even further to my office workers. Warm regards; from all of us.

  10. kyrie 5 spongebob

    My spouse and i have been absolutely excited when Michael managed to carry out his investigation while using the ideas he got when using the web page. It is now and again perplexing to just always be giving away ideas that many a number of people might have been trying to sell. We really recognize we’ve got you to thank for this. The type of explanations you’ve made, the straightforward website menu, the friendships your site help to create – it’s got many terrific, and it is making our son and our family imagine that this idea is pleasurable, and that is wonderfully important. Thank you for all the pieces!

  11. kawhi leonard shoes

    I precisely wished to appreciate you yet again. I am not sure the things that I would’ve made to happen without the actual solutions shared by you directly on that question. It was a real frustrating circumstance in my position, nevertheless being able to see a specialised style you processed the issue made me to weep over contentment. I’m grateful for this support as well as trust you comprehend what an amazing job you’re carrying out training many people using a site. Most likely you haven’t met all of us.

  12. supreme clothing

    I’m commenting to make you be aware of what a notable experience my cousin’s princess found studying your site. She even learned some issues, which included how it is like to have an awesome giving style to have a number of people quite simply learn selected extremely tough topics. You actually did more than my expectations. I appreciate you for churning out these interesting, healthy, explanatory not to mention cool tips about that topic to Lizeth.

  13. supreme clothing

    I have to express my passion for your generosity for those who should have help with this one field. Your real dedication to getting the solution all-around ended up being extremely practical and have in every case allowed many people like me to get to their objectives. Your amazing warm and friendly guide can mean so much to me and somewhat more to my office workers. Thanks a lot; from all of us.

  14. kd shoes

    I want to voice my passion for your kind-heartedness supporting persons who should have guidance on this one area of interest. Your special dedication to passing the solution all-around ended up being incredibly practical and has all the time encouraged individuals like me to arrive at their desired goals. Your amazing helpful hints and tips implies much to me and especially to my fellow workers. Thanks a ton; from everyone of us.

  15. lebron james shoes

    I would like to get across my admiration for your generosity supporting people that really want help on this particular niche. Your very own commitment to getting the solution all through ended up being astonishingly good and has continuously made men and women just like me to realize their targets. Your new warm and friendly hints and tips implies a great deal a person like me and even further to my fellow workers. Thank you; from everyone of us.

  16. golden goose

    I needed to post you a little observation to say thanks a lot once again about the pleasant advice you have shown at this time. It’s quite wonderfully open-handed of people like you to give publicly all that a lot of folks would’ve made available as an electronic book to make some cash on their own, chiefly given that you might well have tried it if you desired. The good tips additionally served as the good way to recognize that other individuals have the same keenness much like my own to learn a great deal more with reference to this problem. Certainly there are lots of more fun opportunities up front for people who looked over your site.

  17. steph curry shoes

    I am commenting to let you know what a terrific encounter my cousin’s girl enjoyed viewing your site. She mastered too many pieces, including how it is like to have a wonderful teaching mood to have men and women without difficulty have an understanding of a variety of complicated issues. You undoubtedly exceeded people’s expected results. Thank you for displaying these beneficial, safe, educational as well as cool thoughts on the topic to Tanya.

  18. bape hoodie

    I would like to convey my love for your kindness supporting men who should have assistance with this particular theme. Your real commitment to getting the solution along turned out to be particularly useful and have in most cases encouraged girls just like me to achieve their endeavors. Your new helpful tips and hints denotes a whole lot a person like me and still more to my colleagues. Regards; from all of us.

  19. chrome hearts

    I precisely desired to appreciate you once more. I do not know the things I might have tried without those tips provided by you concerning such problem. It was actually an absolute fearsome concern in my opinion, but being able to view a new specialized technique you treated it took me to leap for happiness. I’m just happy for this guidance and pray you find out what an amazing job you’re undertaking training most people through the use of your blog. Most probably you’ve never got to know all of us.

  20. bape hoodie

    I am glad for commenting to make you understand of the terrific discovery my wife’s princess found browsing your site. She noticed some issues, including how it is like to have a very effective teaching heart to make the others with no trouble learn specified hard to do things. You actually surpassed visitors’ expected results. Thanks for giving these powerful, healthy, educational and also cool tips about your topic to Ethel.

  21. russell westbrook shoes

    I would like to voice my love for your kindness for men and women that absolutely need help with the idea. Your special dedication to getting the message across ended up being astonishingly invaluable and have always allowed professionals just like me to attain their pursuits. Your personal invaluable tutorial signifies this much to me and still more to my colleagues. Best wishes; from all of us.

  22. goyard

    I precisely wished to say thanks all over again. I’m not certain the things I would have gone through without the entire secrets revealed by you relating to this field. This was a very troublesome problem for me personally, however , witnessing the specialised avenue you handled it forced me to weep over contentment. Extremely thankful for your work and even hope that you find out what a great job you happen to be providing instructing people today with the aid of a site. I am sure you haven’t got to know any of us.

  23. lebron 18

    I wish to convey my appreciation for your generosity supporting women who require assistance with that matter. Your special commitment to getting the message around turned out to be incredibly valuable and has frequently enabled workers much like me to attain their goals. Your amazing valuable key points indicates a lot a person like me and somewhat more to my mates. Thank you; from all of us.

  24. supreme

    I must voice my admiration for your kind-heartedness giving support to those who actually need help on your topic. Your special commitment to passing the solution up and down appears to be amazingly productive and has really empowered men and women much like me to get to their ambitions. Your personal valuable guideline denotes a lot a person like me and even further to my office colleagues. With thanks; from everyone of us.

  25. golden goose

    I am glad for writing to let you be aware of what a useful experience my daughter developed viewing your site. She picked up many pieces, which include how it is like to have an incredible coaching nature to have many more with no trouble understand certain tortuous issues. You truly surpassed our own expectations. Thank you for churning out such effective, dependable, edifying as well as unique tips about this topic to Sandra.

  26. supreme

    I am glad for writing to let you understand of the superb discovery my friend’s daughter gained checking the blog. She discovered so many issues, with the inclusion of what it is like to have an amazing coaching spirit to make other individuals quite simply learn various complicated matters. You truly exceeded her desires. Many thanks for delivering such essential, trustworthy, revealing and in addition easy tips on the topic to Ethel.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *