Was doing some research in using ip2location database and API with IIS to restrict access or show different content to different countries and came across a wordpress plugin so thought I would have a play
Your IP address is [ip2loc:ip].
Your country code is [ip2loc:countryCode].
Welcome, visitor from [ip2loc:city], [ip2loc:region], [ip2loc:country].