Opened 4 years ago

Closed 2 months ago

Last modified 2 months ago

#1317 closed New feature (answered)

Whois Live Plugin

Reported by: rfoo Owned by:
Priority: major Milestone:
Component: Plugins Wishlist Keywords: plugin, live, whois, third-party-plugin
Cc: Sensitive: no

Description

Similar to the Live plugin, but much simpler. Provides one widget, which:

  • displays list of current visits
  • with IP, Provider, Country/City, OS/Resolution, Browser, Referer/Keywords, Last Action Time
  • breaks with the current "datatable" model to provide a more comprehensive view of the last visits
  • on click it queries and displays the whois record of visitors ip

I wrote this plugin to get a better overview of current visitors location, settings and so on. A comprehensive overview, which is not provided by the standard widgets - data was spread out in different widgets, but none showed a combined view of ip, settings, provider and referer per visit. The UI of the Live plugin was too confusing (at least for me).

Note, that it probably does not make much sense for high traffic sites.

You can download it here:
http://www.manjadigital.de/Piwik_WhoisLive.tgz

Works in Piwik 0.5.5 (other versions not tested).

  • requires GeoIP plugin (thought with small changes it could easily work without GeoIP)

Maybe it could be integrated into the Core? License is GPL.

Attachments (1)

live-whois.png (393.2 KB) - added by rfoo 4 years ago.
screenshot

Download all attachments as: .zip

Change History (21)

comment:1 Changed 4 years ago by matt (mattab)

can you please post a screenshot of the new widget? thanks

Changed 4 years ago by rfoo

screenshot

comment:2 Changed 4 years ago by rfoo

screenshot added. a whois record of a visitors ip (middle of screenshot) is also shown (whois records show up on click on visitor row).

comment:3 Changed 4 years ago by matt (mattab)

this looks good, I think it would be great to have this included in the existing Live! plugin, for example in a widget that would give an "advanced spy view". However, there would need to display the list of pages visited as well (maybe the pages could also be detailed, with icon linking to URL + page name?).

Such "detailed" spy widget would definitely be a great add to Live!

comment:4 Changed 4 years ago by rfoo

After using it some time, I came to the same conclusion (needs to display list of pages visited) :) Integration into Live plugin makes sense.

I will work on it, but at the moment I am very busy with other projects, it will take some weeks..

comment:5 Changed 4 years ago by mudd1

Great plugin! Seems to be broken since my upgrade to Piwik 0.6.3 though:

Fatal error: Call to undefined method Piwik::prefixtable() in /.../.../.../piwik/plugins/WhoisLive/Controller.php on line 102

comment:6 Changed 4 years ago by rfoo

Here you'll find a minor update: http://www.manjadigital.de/Piwik_WhoisLive-0.2.tgz

This version will work with Piwik 0.6.3!

Though, it has no new features yet - I just found no time. Improvements are welcome, the code is small and mostly understandable ;-)

comment:7 Changed 4 years ago by lehrer

Hi,

First of all thank you for the great initative!

I received the following error:

Warning: exec() has been disabled for security reasons in /home2/gershonl/public_html/analyse/plugins/WhoisLive/Controller.php on line 111

Backtrace -->
#0 Piwik_ErrorHandler(2, exec() has been disabled for security reasons, analyse/plugins/WhoisLive/Controller.php, 111, Array ([fetch] => ,[out] => Array (),[ip] => 76.74.64.2)) called at [(null):0]

#1 exec(whois '76.74.64.2', Array ()) called at analyse/plugins/WhoisLive/Controller.php:111

#2 Piwik_WhoisLive_Controller->getWhoisFromIp() called at [(null):0]

#3 call_user_func_array(Array ([0] => Piwik_WhoisLive_Controller Object ([] => WhoisLive,[] => 2010-09-16,[] => Piwik_Date Object ([] => 1284595200,[] => UTC),[] => 2,[] => Piwik_Site Object ([] => 2),[minIdVisit] => 0,[unknownOnly] => ),[1] => getWhoisFromIp), Array ()) called at [analyse/core/FrontController.php:126]

#4 Piwik_FrontController->dispatch() called at [analyse/index.php:60]

comment:8 Changed 4 years ago by rfoo

Hello Lehrer,

this is a configuration issue of your PHP installation. The plugin uses exec() to call the whois program to retrieve information about an IP. exec() is disabled on your PHP installation.

However, it could retrieve whois information from a whois server, but currently it just uses the "whois" program, and I currently do not have the time to update it...

comment:9 Changed 4 years ago by lehrer

Hi,

Is there a way to enable exec?
Will that be safe?

Gershon

comment:10 Changed 4 years ago by mudd1

Is it safe? The answer is: it depends.
http://stackoverflow.com/questions/1295346/is-php-exec-safe

How do you enable it? Surprise, it depends. On your hoster/php installation. Google will surely help.

comment:11 Changed 4 years ago by lehrer

Hi,

I did succeed in changing the setting.
I don't get the error anymore. I however do not get any results in the space which opens when you click on the ip-record.

G L

comment:12 follow-up: Changed 3 years ago by mz906

I'm getting an undefined index, pretty long message:

Notice: Undefined index: location_geoip_country in /var/www/subdomains/trck/html/piwik/tmp/templates_c/%%7E7E37E367717%%index.tpl.php on line 65

Backtrace -->
#0 Piwik_ErrorHandler(8, Undefined index: location_geoip_country, /var/www/subdomains/trck/html/piwik/tmp/templates_c

comment:13 Changed 3 years ago by vipsoft (robocoder)

Note: for Piwik 1.4 compatibility, in WhoisLive/Controller.php, change:

			$row['ip'] = long2ip( $row['location_ip'] );

to:

			$row['ip'] = Piwik_IP::N2P( $row['location_ip'] );

comment:14 in reply to: ↑ 12 Changed 3 years ago by nslyv

Replying to mz906:

I'm getting an undefined index, pretty long message:

Notice: Undefined index: location_geoip_country in /var/www/subdomains/trck/html/piwik/tmp/templates_c/%%7E7E37E367717%%index.tpl.php on line 65

Backtrace -->
#0 Piwik_ErrorHandler(8, Undefined index: location_geoip_country, /var/www/subdomains/trck/html/piwik/tmp/templates_c

Quick fix:
Edit "index.tpl" and remove or comment out the line with

{$row.location_geoip_country|escape:"html"} / {$row.location_geoip_city|escape:"html"}

comment:15 Changed 3 years ago by boosis

I installed this plugin on Piwik 1.4 but the time displayed is 1 hour earlier than the actual time. Piwik showing lates user time as 01:21:45 and this plugin shows it as 00:21:45

Do I need to do any settings for this?

comment:16 Changed 14 months ago by halfdan

@rfoo, is this plugin still alive? It would be great if you could check if it still works with the latest Piwik versions and maybe put the code up on Github.

comment:17 Changed 8 months ago by rfoo

Finally on github: https://github.com/rfool/PiwikWhoisLive

Happy Hacking.

comment:18 Changed 2 months ago by matt (mattab)

  • Resolution set to answered
  • Status changed from new to closed

Along with the Piwik 2.0 release and new design for Piwik, we have also launched the official Plugins Marketplace to let any developer share their work to the thousands of Piwik users worldwide.

Maybe you'd like to publish your plugin there?

In any case, keep up the good work and we hope you enjoy Piwik 2!

comment:19 Changed 2 months ago by matt (mattab)

  • Keywords third-party-plugin added

Adding third-party-plugin tag to all Piwik 1.x third party plugins. For more information, please visit the Developer docs, the Plugins Marketplace, the themes Marketplace and see #4607

If you have any question or feedback, get in touch in our Piwik developers forum. Happy new year 2014!

comment:20 Changed 2 months ago by matt (mattab)

  • Milestone Third Party Piwik Plugins deleted

Milestone Third Party Piwik Plugins deleted

Note: See TracTickets for help on using tickets.