Make GET calls directly to geoip.php to get GeoIP info like this:
PHP v7.4.33

Passing a format string can give you different output:
http://geoip.gotmls.net/geoip.php?format=Your IP: geo(ip)<br />IP Location: geo(city), geo(region_name), geo(country_name) would give you:

or just include this JavaScript on your page:

and get this output:

This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com.