I found a collection of code snippets for getting visitor ip address from api.geoipapi.com/json for blocking malicious ip addresses or handling european union visitors. I figured it would be helpful and post here
Documentation: https://geoipapi.com
Code Snippets: GitHub - geoipapi/misc: Geolocation API - Miscellaneous code snippet examples