IP Whois Lookup (HESK 2.4)

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
D12Eminem989
Posts: 12
Joined: Fri Aug 10, 2012 12:28 pm

IP Whois Lookup (HESK 2.4)

Post by D12Eminem989 »

This simple little code adds a whois lookup to the ip.

Open /admin/admin_ticket.php, and find:

Code: Select all

			    <td><?php echo $ticket['ip']; ?></td>
Replace with:

Code: Select all

			    <td><a href="http://whois.domaintools.com/<?php echo $ticket['ip']; ?>" target="_blank"><?php echo $ticket['ip']; ?></a></td>
Enjoy!
Last edited by D12Eminem989 on Sat Aug 11, 2012 10:33 am, edited 1 time in total.
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: IP Whois Lookup

Post by Klemen »

Nice one, thanks!
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
yaqwer
Posts: 11
Joined: Tue Sep 20, 2011 12:25 pm

Re: IP Whois Lookup (HESK 2.4)

Post by yaqwer »

Quite a good idea, but the whois provider gets back the referer. So be careful.
t2s
Posts: 2
Joined: Sun Dec 23, 2012 9:43 pm

Re: IP Whois Lookup (HESK 2.4)

Post by t2s »

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>
Post Reply