I'm trying to get this to work but it looks like the instructions might be missing a piece. How do yo provide an IP as input??
it looks like you'd want to do it on this line:
$ip2country_info = ip2country_info($ip2country->country_code);
$ip2country_info = ip2country_info('18.104.22.168');