After googling, I found many solutions that don't seem to work or require permission from the user.
Looking for something that is easy to use, PHP or Javascript, and does not require the user's permission. It doesn't need to be the most accurate.
Google Analytics is great for this (javascript).
EDIT: Should point out that Google Analytics has an API to get City/Country info and all reporting info if you need to programmatically do something with it - http://code.google.com/apis/analytics/docs/
But if that's not an option:
You can get a users ip with PHP's $_SERVER['REMOTE_ADDR']
With that, you can use PHP's GeoIP library to geolocate it: http://php.net/manual/en/book.geoip.php