Refer to this question to see how to get the client's IP address. Most of the services mentioned in that question will also return the IP address's location, and thus allow you to compare it to the location provided by the geolocation API. If the service does not provide the location, refer to this question to convert the IP address into a location.