.: ShaolinTiger - Kung-Fu Geekery :.

A small change to Wordpress to make WHOIS International

I had a problem with wordpress when I first started using it, being based in Asia most of my commenters are from this region, mainly Malaysia.

So when I tried to look up the commenters IP addresses in Wordpress, I didn't get any information because it defaults to ARIN (The American Registry) to lookup the IP addresses.

Like for example this:

http://ws.arin.net/cgi-bin/whois.pl?queryinput=60.48.199.141

It just says registered to APNIC (Asia Pacific Registry).

Where as if you use another service like Whois.sc, it will show you proper location like so:

http://www.whois.sc/60.48.199.141

To fix this, you need to edit the /wp-admin/edit-comments.php file.

The lines you need to edit are 92 and 145.

You need to change:

http://ws.arin.net/cgi-bin/whois.pl?queryinput=

to

http://www.whois.sc/

Code Change

Then re-upload the edit-comments.php file to your active install, and refresh the comments page, you can now click the IP address of the commentors and get the correct information!

Digg this article

9 comments