BTW.. this is the data file and api from Mindmax ...
Main Topics
Browse All TopicsI need a script that will both show the user their real country code and country name when they access a web page on my server and then send that information to me.
Mindmax has a javascript for this and it does work, but how do I collect that data?
I have linux and apache and can run perl and javascipts ..and I have mysql on my server.
I do need a script for this, can't just use suggestions so please only post if you have links to something I can use.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Well, I am not sure of how to use the PHP script. What I need is to Collect that information and the script I have will just show the info. So how do I collect the data?
I have FrontPage which I know isn't the best but it can http Post and return some info to me. However it doesn't allow for the country code or name.
It's supposed to be in the PHP and Javascript category, but I apologize for the misunderstanding.
I have the code already on a webpage that you show above. The problem is how to collect that data
For example: A customer inputs their name , and email address on a form. That form then returns that data to me. I also want to return the country code and country name from the same form.
Great! Ok, got it.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtm
<html xmlns="http://www.w3.org/1
<head>
<script type="text/javascript" src="http://j.maxmind.com/
<script type="text/javascript">
var fnPostForm = function(e){
document.getElementById("c
document.getElementById("c
return true;
}
</script>
</head>
<body>
<?php
if ($_SERVER['REQUEST_METHOD'
echo "Form values: "; print_r($_POST);
}
?>
<form id="frmContact" action="--WEBBOT-SELF--" method="POST" enctype="application/x-www
<!--webbot bot="SaveResults" S-Email-Address="MyEmailad
<fieldset>
<input type="hidden" id="countrycode" name="countrycode" value="" />
<input type="hidden" id="countryname" name="countryname" value="" />
<label for="fullname">Your Name:</label>
<input type="text" id="fullname" name="fullname" value="" />
<label for="emailaddr">Your Email Address:</label>
<input type="text" id="emailaddr" name="emailaddr" value="" />
<button type="submit" id="cmdPostForm" value="Post Form">Post Form</button>
</fieldset>
</form>
</body>
</html>
Glad to help.
To send an email using php use the mail() function: http://php.net/manual/en/f
If you want a full scripted example, I think it would be fair to post another question. Post the link to that question here and I will be glad to answer it!
TheFoot
Sorry, my last post ended up after I had figured it out.
<form id="frmContact" action="--WEBBOT-SELF--" method="POST" enctype="application/x-www
<!--webbot bot="SaveResults" S-Email-Address="MyEmailad
In the form id you can put the email address with the webbot bot from MS frontpage as it appears above.
Thanks again for your help, it's working perfectly now.
Glad you got it sorted. Just a word of caution though - frontpage extensions out of the box can be a security risk for a live web server. This link has some tips on securing FPSE:
http://www.windowsecurity.
Business Accounts
Answer for Membership
by: TheFootPosted on 2009-10-16 at 08:25:31ID: 25590417
Hi.
The below PHP code will return a countrycode for the current users' IP address. Obviously you will need to change the paths where applicable.
NOTE: Rename "GeoIP.txt" to "GeoIP.dat" and rename "geoip.inc.txt" to "geoip.inc"
You can easily embed this value into a javascript variable to use in client-side.
TheFoot
Select allOpen in new window
GeoIP Data File
GeoIP API