you need geotargeting setup on your server first, then you follow the geotargeting script's instructions. We use maxmind, they have free and paid versions, and all instructions for using the script are on their site (it differs depending on what you are coding in and what you are trying to accomplish)