You can obtain an XML response from hostip.info if you use the following URL:
http://api.hostip.info/?ip=193.148.1.1
instead of:
http://api.hostip.info/get_html.php?ip=193.148.1.1
Then, you can parse the XML which is kind of cleaner than Regex, and probably more immune to the possible changes of output formatting.
This is an example of parsing the output:
$response = file_get_contents('http://api.hostip.info/?ip=193.148.1.1');
$xml = new DOMDocument();
$xml->loadXml($response);
$xpath = new DOMXpath($xml);
$path = '/HostipLookupResultSet/gml:featureMember/Hostip/';
$ip = $xpath->evaluate($path . 'ip')->item(0)->nodeValue;
$city = $xpath->evaluate($path . 'gml:name')->item(0)->nodeValue;
$countryName = $xpath->evaluate($path . 'countryName')->item(0)->nodeValue;
$countryAbbrev = $xpath->evaluate($path . 'countryAbbrev')->item(0)->nodeValue;