Try this
Code: Select all
<td><?php $lok=simplexml_load_file('http://smart-ip.net/geoip-xml/'.$ticket['ip']); echo $ticket['ip'],' - ',$lok->city,' - ',$lok->region.' - '.$lok->countryCode; ?></td>
its show info like:
83.28.9.228 - Harasiuki - Podkarpackie - PL
You can get other more info from xml, its contains:
Code: Select all
<geoip>
<source>smart-ip.net</source>
<host>83.28.9.228</host>
<lang>en</lang>
<countryName>Poland</countryName>
<countryCode>PL</countryCode>
<city>Harasiuki</city>
<region>Podkarpackie</region>
<latitude>50.4734</latitude>
<longitude>22.4840</longitude>
<timezone>Europe/Warsaw</timezone>
</geoip>