diff --git a/plugins/serendipity_event_statistics/serendipity_event_statistics.php b/plugins/serendipity_event_statistics/serendipity_event_statistics.php index 5fcabbdb..a3a99b9b 100644 --- a/plugins/serendipity_event_statistics/serendipity_event_statistics.php +++ b/plugins/serendipity_event_statistics/serendipity_event_statistics.php @@ -840,6 +840,7 @@ class serendipity_event_statistics extends serendipity_event
".wordwrap($row['browser'], 25, "
", 1)."\n"; echo "
"; if ($row['ip']){ - echo wordwrap(gethostbyaddr($row['ip']), 25, "\n", 1); + $curIP = $row['ip']; + if (array_key_exists($curIP, $resolvedHosts)) { + $resolvedHost = $resolvedHosts[$curIP]; + } else { + $resolvedHost = gethostbyaddr($curIP); + $resolvedHosts[$curIP] = $resolvedHost; + } + echo wordwrap($resolvedHost, 25, "\n", 1); } else { echo "--"; }