Extract the hostip.info stubbing into a common method.