Geo technology coding help needed

We have created a site that pulls in the location (longitude and latitude) from an app. We are looking for a free open source geo location software that is reliable, and are trying to figure a way to code several set locations to different URLs if the user of the app is within a certain distance of each location. Example: If the user hits the app and is within 1 mile of a location entered into the program they would be directed to site abc, and if they are with 1 mile of a different location entered, they would be directed to xyz site. This is to all be done from the same app, so they are directed automatically to the correct site based on their location. Anyone done this or have any suggestions?