Just add this code anywhere in main.tpl or sidebar.tpl This will show flag of the visitor's country you can see live demo at http://www.rmmfa2004.org
Well, that's interesting I might try it on my free directory (if my friend let me edit something in there ) So now I will be confirming a user that he is browsing from his country. (kidding)
hostip.info is a fantastic open, community built database which anyone can use, ?: being open and non-commercial it has its limitations and sometimes lack of data (IP ranges keep especially AOL and stuff, sometimes one IP is of US the next day the IP allocated to europe!!!, But all in all works fab)
Another gr8 use of hostip.info is you can use it to find the country and City of the visitor, I have been using this functionality on my contact form on all my sites, and with permmission from freewebspace, i am releaseing the following codes in this thread, these codes I found on a public forum released from the people at hostip.info and are not mine USE: so i know exactly where my visitor sending me an email is located, using my contact form. Codes: Open your contact.php and find : //Add body message $bodyMsg = ''; Code (markup): add above that: $no_ip = get_client_ip(); //phpLd function $hostip= "http://api.hostip.info/get_html.php?ip=$no_ip"."&position=true"; $result = @ file($hostip); $message1 = "\n\nYour IP is $no_ip"; $message1 .= "\n$result[0]"; $message1 .= "\n$result[1]"; $message1 .= "\n$result[2]"; $message1 .= "\n$result[3]"; /* In the array $result, we will find: $result[0] : Country: INDIA (IN) $result[1] : City: (city) $result[2] : Latitude: $result[3] : Longitude: */ Code (markup): Next find: $bodyMsg .= trim ($data['MESSAGE']); Code (markup): Under that add: $bodyMsg .= "******************************\n\n"; $bodyMsg .= $message1; Code (markup): Done!