» IP City Cluster WordPress-Plugin

Abstract

The IP City Cluster Plugin (IPCCP) generates a geographical cluster map based on where from people access you website (or to be precise: based on the IP they got from their provider). It requires a statistics plug-in (that keeps a database or logfile) which keeps track of the IP. Key features include a preview with a lightbox way of zooming, image maps for city names and hit counters for both the preview and zoomed image, template output, smart clustering and user control over color, sizes and such.

IPCCP

Some of you might be familiar with the ClustrMap Service. I signed up this month and was instantly hooked. After a week or two I had two issues though. One: why didn’t I sign up ealier (or how am I going to convince them to read my logfile)? Secondly you had to pay for the advanced service. Not my cup of tea (not to mention that you are always dependent on their service being up ;) – I decided to look into writing my own cluster map WordPress plug-in. Key problem was of course the lookup of IPs. Fortunately MaxMind offers a free database and the required API to get City name, country name as well as longitude and latitude corresponding to an IP address.

As you can see, it works quite well:

IPCCP generated Cluster Map for my web gallery []
[move mouse over a cluster to get information, click to zoom]

Requirements

As mentioned above the expected requirement is an SQL database with IPs. Most statistics plug-ins will keep track of that (f.e. Counterize). On a technical level I think PHP5 should do the trick. IPCCP is not using any WordPress specific calls and should work with any version. I can’t test any other but the current 2.1 though.

[Note:] Running IPCCP on a large data set might require some calculation time, which could exceed the maximum PHP execution time (usually 30sec). Therefore IPCCP can try to extend this execution time, which will require the server to not run in PHP safemode. Check with you friendly system administer if you don’t have the appropriate access level. It took more than 5 minutes to generate the picture above (admittedly on my ancient webserver – but you get the point).

Setup

Setup itself is the usual 1-2-3 of downloading, expanding into
/wordpress/wp-content/plugins
and activating. Check the IPCCP options panel in the admin section and set those values to your liking. You’ll see a first preview there. Provided are both the direct function call (for sidebar’s, footer and such)
   <?php if(function_exists(ipccp)) ipccp(); ?>
and the token word access
   [IPCCP]
for posts or pages. You might want to check MaxMinds website once in a while, as they offer monthly updates to their database. Simply download the GeoLiteCity databases and drop them into the GeoIP folder within the IPCCP plug-in folder.

[Note:] Make sure the webserver has write permissions on those files:
   /wordpress/wp-content/plugins/ipccp/images/ipccp_out*
[Note:] You could also add
   <?php if(function_exists(ipccp_recluster)) ipccp_recluster(); ?>
anywhere in your template to activate the reclustering. Use carefully though!

Options

All IPCCP options are accessible through the corresponding admin options panel. First of all make sure to enter the correct SQL table and key name (if it’s anything else than "IP"). There are three ways to generate a new picture:
- pressing Redraw in the admin panel
- calling an URL with the addition of ?recluster=true
- using the scheduling feature (which automatically generates the cluster map after a specified amount of time or to be precise, it automatically generates the cluster map, by the next call IPCCP-call after the user specified time. But give the amount of spammers and bots that are crawling over public sites. this should be close the the specified time itself. Doesn’t it give you some satisfaction, that they are actually doing some good for you :) Just be aware of the CPU time required for the generation before scheduling IPCCP too often (or adding your terabyte long logfile).

License

This WordPress plug is released under the GPL and is provided with absolutely no warranty (as if?). For support leave a comment and we’ll see what the community has to say.

Download [v0.b5.8 - ]


Complete []  [] 
ipccp.php.zip  [] 
GeoIPCity   [] 
GeoIPCountry [] 

FAQ

Q: Parse error: syntax error, unexpected ‘)’, expecting ‘(’ in [..]/ipccp/ipccp.php on line XYZ
A: Most likely you are not running PHP5, which is required for the GeoIP API to work. You need to upgrade before using IPCCP.

Q: Doesn’t seem precise, or what?
A: Actually what we are looking for is accuracy. IPCCP is (of course) 100% precise (having no stochastic parts at all). Accuracy is a different matter. The longitude / latitude values are often more of an estimate. But MaxMind promises monthly updates, so keep checking their website and grab the current databases (or use the links above). But to be honest, for this matter I think it’s all good enough. It’s all about the impression if you ask me.

Q: What if I still want more accuracy?
A: You can go ahead and buy their commercial Databases which are currently $420 (base price) + $102 (per monthly update) for the set of City and Country database.

Q: What’s the legend to the cluster map?
A: I’ll add a legend as we go along. For now just this quick remark: you see four numbers at the bottom left. For the picture above they are:
   » 2881492 IP-entries numbers found
   » 2879499 IP-entries numbers found minus the Satellite Operators
   » 45787 unique IP numbers
   » 5696 unique places
   » 727 unique clusters drawn
Q: Why is there an option to disable the image maps?
A: Using the image maps will probably drastically increase the length of the HTML-code (especially if you have some million entries from all over the place). Just look at the source of this page… Some people might wish for the image only and don’t care for the additional information. Hence the option. Q: What was the issue with using the ipccp_out_smal.jpg picture as a preview?
A: IPCCP is generating three pictures. The native 2000*1000px ipccp_out.jpg, the user specified large version ipccp_out_big.jpg and the user specified small version ipccp_out_smal.jpg. The scaling of the later two is done by the PHP GD library, which isn’t near up to standards if you ask me. Just compare the scaled version with the scaling done by the browser (which on OSX is done by the far superior QT). Hence I recommend leaving the small GD version be and simply use the big version. Given that most people will look at the zoomed version anyway that actually saves the download of two images.

Q: How can I help?
A: If you have rights to any maps and are willing to donate them for the project, that would be great. I’ll add a feature where the user could choose his/her map from a given available set. The same holds if you have the rights to a more detailed database! Donate them and earn eternal gratitude from millions of WordPress Users.

this is what it might look like   

Todos

» progress status bar of image generation » Implementing own scheduling feature » Adding a cluster legend » listing of cities in a cluster » Adding more extensive logfile support »»» using any logfile location »»» filtering IPs and not expecting IPs only » Add JPG quality option [] » Non-linear grading of sizes & colors [] » Adding a choice of maps » Adding a time filter (allowing only date ranges) »»» Adding an “automatically generate archive” feature (wouldn’t it be great to see how things grew in an animation?) » Detailed evaluation (once I get some detailed maps and the corresponding long/lat values)

Known Issues

- the new “all cities per cluster” feature is not supported by all browsers. actually it’s probably only supported by Safari (or Konquerer or the like) and probably it’s not correct (X)HTML either. But it sure looks cool when it works :) [Update] It also works in IE7! Maybe it’s only Firefox that got trouble displaying multiline titles?

Version History

05.jun.2008v0.b5.8 []
» optimised code: drastically increased speed of IP lookup
» optimised code: now checking syntax of database IPs as well
13.mar.2007v0.b5.7 []
» bugfix: counting of visits fixed
08.mar.2007v0.b5.6 []
» optimised code: using less RAM []
» optimised code: runs faster with large datasets []
» increased verbosity while generating the cluster map
06.mar.2007v0.b5.5 []
» new feature: JPG quality
» new feature: non-linearity in clustering
» bundled new GeoIP database (March.2007)
23.feb.2007v0.b5.4 []
» new feature: more details in subtitle & legend
» optimised code: loading image map only on needed pages/posts
» bugfix: scheduled task now works as claimed
22.feb.2007v0.b5.3 []
» new feature: print all city names in a cluster
» optimised code: rewrote smart clustering []
» optimised code: lightbox JS []
» bugfix: template now correctly saved
20.feb.2007v0.b5.2 []
» new feature: verbosity while generating the cluster map
» new option: Performance vs Memory efficiency
» new option: legend []
» optimised code: reading of large files now reliable and fast
» optimised code: _getSize rewritten
» corrected behaviour: when called with no data
» corrected behaviour: when first called
» corrected behaviour: _updateOptions and value validation updated
» bugfix: image map not precise
» bugfix: correct readout of international characters in city names
18.feb.2007v0.b5.1 []
» extended logfile support []
17.feb.2007v0.b5 » first public release []
» new option: cron like automated generation []
» slightly modified admin panel
» bugfix: rare change of user specified values for the template
16.feb.2007v0.a4 » new option: recluster by cron
» new option: recluster by url
» finished admin panel
15.feb.2007v0.a3 » lightbox + image maps []
» rendering of small and big images
14.feb.2007v0.a2 » smart clustering []
» added logfile support []
» new option: image map support
» new option: show your place
13.feb.2007v0.a1 » Preliminaries []
» figured out how long/lat corresponds to planar maps
» figured out how to draw []
» clustering of neighbouring citys into bigger ones

105 Responses [Umgekehrte Reihenfolge]

  1. Zenith
    #68091
    103

    This is a functionally equivalent version using imagesetstyle() and imageline():

    function _DashedCrossHair($im,$lon,$lat) {
    $local = $this->_ImageColorAllocateFromHex($im, $this->user_Color_Crosshair);
    #imagedashedline($im,$this->_Lon2X($lon),0,$this->_Lon2X($lon),1000,$local);
    #imagedashedline($im,$this->_Lon2X($lon)+1,0,$this->_Lon2X($lon)+1,1000,$local);

    $fg = $this->_ImageColorAllocateFromHex($im, $this->user_Color_Crosshair);

    $st = array($fg, $fg, $fg, $fg, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT);
    ImageSetStyle($im, $st);

    imageline($im,$this->_Lon2X($lon),0,$this->_Lon2X($lon),1000,IMG_COLOR_STYLED);
    imageline($im,$this->_Lon2X($lon)+1,0,$this->_Lon2X($lon)+1,1000,IMG_COLOR_STYLED);

    $local = $this->_ImageColorAllocateFromHex($im, $this->user_Color_Crosshair);
    #imagedashedline($im,0,$this->_Lat2Y($lat),2000,$this->_Lat2Y($lat),$local);
    #imagedashedline($im,0,$this->_Lat2Y($lat)+1,2000,$this->_Lat2Y($lat)+1,$local);

    imageline($im,0,$this->_Lat2Y($lat),2000,$this->_Lat2Y($lat),IMG_COLOR_STYLED);
    imageline($im,0,$this->_Lat2Y($lat)+1,2000,$this->_Lat2Y($lat)+1,IMG_COLOR_STYLED);
    }

  2. Zenith
    #68090
    102

    FYI, there seems to be a bug in PHP 5.1.1 and PHP 4.0.1 which causes the imagedashedline() function to work only with vertical lines. As reported in (http://tw2.php.net/imagedashedline).Therefore anyone using the PHP versions above with “Add my place” turned on will not see a crosshair – just a vertical line. Can be resolved by replacing imagedashedline() with imageline(), and specifying a line style with ImageSetStyle. (Recommended for future versions for compatibility)

  3. #68055
    101

    Hello.

    I’ve read through the comments regarding using IPCCP and StatPress. So far, I am unable to get it working correctly.

    I’ve changed the default setting of “Counter table name” to “wp_statpress” as well as changing the default setting of “remote IP field name” to from “IP to “ip”.

    I have not made any additional changes to the default settings, when I click “Update Settings & Redraw”, I am presented with:

    Cluster Map Generation Started
    0s >> Loading GeoIP into memory

    As well as the message “Generating the cluster map might take a while – please be patient!”

    I let it sit there for a long period of time and nothing changes. When I eventually decided to revisit the settings page, I am giving a preview map.

    My method in trying to add the map to the front page of my blog in the sidebar, was to edit the widgets, add a “text” widget, including the “Output template” on the IPCCP settings page. All that I see on my sidebar is: “%BLOGNAME% Cluster Map”. This indicates to me that the image is not being displayed, as that is the alt tag defined in the HTML.

    Assistance would be greatly appreciated.

  4. #68026
    100

    Hey Robert Jones,

    check comment #74 (and below) for some discussion on fetching data from statpress. does that help you any?

    cheers,
    -tmb

  5. #68023
    99

    I can’t get this plugin to work. Using WordPress 2.7 and the Statpress plugin to capture the ip data in a table called “wp_statpress” from the field “ip”. On the options page for IPCCP, when I click “Update Settings & Redraw”, I see these messages above a blank map:

    Cluster Map Generation Started
    0s >> Loading GeoIP into memory DONE
    2s >> Fetching database entries (SELECT ip FROM wp_statpress) DONE (1418 entries)
    2s >> finished fetching 0 entries
    2s >> Finished with additional drawings
    Done generating a new cluster map

    1418 entries returned from the query then suddenly 0 entries? Doesn’t make sense. Obviously IPCCP is querying the db correctly (there are in fact 1418 entries in this table) but isn’t processing them correctly. HELP!

  6. #67756
    98

    tmb-

    I think so. It’s from Anders Holte Nielsen, version 0.53 and appears to be collecting data fine.

    Cheers!!

  7. #67753
    97

    Hey Poppa Bear,

    still struggeling with the same issue as in comment #86? I really have no clue whats happening. You are using Counterize (and not Counterize II), right?

    cheers,
    -tmb

  8. #67752
    96

    tmb,

    any chance of getting any help with this?

    Cheers!!

  9. #67729
    95

    Another note: There is a potential conflict of this plug in with the SuperCache plug in. When I enable this plugin I lose all my theme when my blog is rendered.

    -1- When I disable SuperCache plugin alone the theme rendering comes back.

    -2- When I disable the ip city cluster plugin alone the rendering comes back.

  10. #67728
    94

    I am using statpress with TABLE = wp_statpress and FIELD = ip ….. I entered the values in the setup page then set my minimum cluster =1 ( so I could get immediate results ) but I get the following….appears like it sees 4206 entries but fetches none. Any clues?

    Cluster Map Generation Started
    0s >> Loading GeoIP into memory DONE
    0s >> Fetching database entries (SELECT ip FROM wp_statpress) DONE (4206 entries)
    0s >> finished fetching 0 entries
    0s >> Finished with additional drawings
    Done generating a new cluster map

  11. #67727
    93

    hey Fred,

    to answer your question, I’ve used the binaries. Just download the complete package and you’ll notice the files in ipccp/GeoIP/ (the ».dat« files). BTW you shouldn’t need to download anything unless you want the latest GeoIP distribution.

    cheers,
    -tmb

    ps: the download section above has working links to the database-files.

  12. #67726
    92

    You do not explicitly mention a whether you used the MaxMind CSV or the Binary with API. Thus I do not know which to install. For CSV I have to write a converter to SQL file because my host does not allow CSV upload any more.

  13. #67723
    91

    Hey “The Spirit”,

    not a lot of info there… any error messages in your servers log files?

    cheers,
    -tmb

  14. The Spirit
    #67722
    90

    Hi.
    Found this cool plugin. Installed counterize (allready had statpress) to use this plugin.
    But after putting in the wp_Counterize and the IP of my webpage, he only shows this:

    Cluster Map Generation Started
    0s >> Loading GeoIP into memory

    even after 15 min, there is no change
    what could be the problem?
    Thanks

  15. #67684
    89

    tmb-
    I did a complete reinstall and updated the GeoIP/City data without success. I’m thinking that the new error occurred after updating to newer GeoIP/City. I’m also guessing that IPCCP is not “connecting” to the counterize data. The only changes I made from the default settings, that I can recall, were the counter table name and field and the output template. Any ideas?

    Cheers!!

  16. #67667
    88

    tmb–

    Sorry but I’m still using the same version (0.b5.8) but have never been able to get it to work yet. Counterize appears to be providing data, however, it seems like IPCCP isn’t connecting to it. Could that be possible?

    Cheers!!

  17. #67666
    87

    Hey Poppa Bear,

    this is really weird and currently I’ve really got no clue. I checked your site and the /cool – test you mentioned earlier. Just wondering: which version of IPCCP are you using now (the one that doesn’t work)? And which version was working for you in Feb?

    cheers,
    -tmb

  18. #67665
    86

    tmb-

    I’m still having troubles getting this to work. Counterize is presenting data, however, nothing appears to happen with IPCCP after hitting update settings and redraw except I now have a new error now but cannot be sure what caused this change:

    Parse error: syntax error, unexpected $end in /my_install/location/public_html/wordpress/wp-content/plugins/ipccp/GeoIP/GeoIP.php on line 1

    Still no entries in the bluetrait event viewer nor in the server error log. I really dig your plugin and want to get it to work on my site, so I look forward to your help. Please let me know what info you need or you need me to do for this to work. Thanks!

    Cheers!!

  19. #67664
    85

    Hey Poppa Bear,

    you are quite right. IPCCP has no table of it’s own. It’s using the table Counterize is filling. Thus IPCCP will work with any statistics plugin that keeps track of the necessary infos.

    why are you wondering?
    -tmb

  20. #67663
    84

    tmb — Welcome back from holiday! Question: IPCCP is making it’s own queries of the countrize table, right? I was curious about the relationship between counterize and IPCCP.

    Thanks again for your help with the bothersome questions.

    Cheers!!

  21. #67660
    83

    Hey Zenith,

    thanks for the feedback. I think FF has always been displaying the Cities without linebreaks. For me that makes it useless as most spots of interest usually contain too many Names for my display. Ah well, you just can’t have it all.

    cheers,
    -tmb

  22. Zenith
    #67657
    82

    FYI, Firefox3 can now handle the “all cities per cluster” feature, albeit not completely correctly (linebreaks are disappeared). It shows the full string of city names rather than the shorten form in earlier versions.

  23. #67638
    81

    When I click on Save Settings and Redraw an error appear to me: Parse error: syntax error, unexpected $end in /home/user/public_html/wp/wp-content/plugins/ipccp/GeoIP/GeoIP.php on line 1

  24. #67623
    80

    tmb-

    Nope, nothing in the error logs for IPCCP. And I don’t get even the cluster map generation message, only the patience message. Question: IPCCP is making it’s own queries of the countrize table, right? I was curious about the relationship between counterize and IPCCP.

    Thanks again for your help with the bothersome questions.

    Cheers!!

  25. #67622
    79

    @Poppa: now thats wierd. Here a screenshot of how it should looks like:

    But I guess you know that, since you mentioned trying it at some other website. Any messages in your servers error log?


    @Nelson: you long/lat works for me (have a look at http://blog.vimagic.de/statistics/ ) … Sure you’ve entered the values correctly (comma vs. periode issue maybe?)

    Yeah, I’m Albert – using my old Uni as a ssh proxy. And as Albert Einstein was born here, their node carries his name.

  26. #67621
    78

    tmb-

    I’ve uploaded a snap at www.{mywebsitehere}.com/IPCCP_status.jpg showing exactly what the bottom of the config page looks like after selecting “Update Settings & Redraw”. Counterize is installed and functioning. I confirmed that there are IPs in the DB as well. I currently have >50 hits (most of them me), so I would’ve guessed that generating output would be something less than 10 minutes. Regardless, this page has not changed. Now, before I select “Update Settings & Redraw” I can see the default, static map. That same map is also visible at www.{mywebsitehere}.com/cool, the page I was testing this feature out at.

    Thanks for your efforts and time with this plugin and my questions!

    Cheers!!

  27. #67620
    77

    Hi tmb —

    Yes, It’s working fine now, in all respects. Maybe it just wanted me to pester you one last time! :oD

    Longitude = -121.86
    Latitude = 36.60
    My place color = #9900FF

    I really appreciate your plugin and I really appreciate your patient willingness to help me sort out my problems. Thanks again.

    So, are you @ Albert, Reutingen, or Waldstetten?

    All best,

    – Nelson

  28. #67618
    76

    hey nelson,

    no worries – cross posting happens. anyhow, seems to be working fine at my end (even with the big map). I think this happens only, if click on the image before your blog page is completely loaded, could that be? Than it’s not using the Lightbox-style zoom but loads the image only. The detailed stats work with a image map being defined when you blog loads (which is located in the footer of your page for better readability of the page HTML source). Obviously this can’t work if you load the image only.

    hope this helps,
    cheers,
    -tmb

    ps: what’s you long/lat values?
     
     
     
     
     

  29. #67617
    75

    Hey tmb –

    We cross posted. Sorry I didn’t see your #73 solution when I wrote my PS in #74.

    Anyhow, it works! You’re a champ! Thank you so much!!!

    One thing I notice, in the big map the cursor turns into a magnifying glass with a “+” in it and looses the capability (as it has in the small map) to click on a spot to see the hits detail. Is that normal?

    Thanks again,

    – Nelson

  30. #67616
    74

    Hey Tim and Poppa Bear –

    Maybe this will help. At least it’s what seemed to make a difference for me, finally.

    All I needed to do is go into cPanel and phpMyAdmin for my database, open the wp_statpress table (my WP stats plugin is StatPress) and check the name for the field that holds my IPs (in my case the name is “ip”) and then went to my setting for “remote IP field name:” in the IPCCP Options admin screen and changed it accordingly (its default was “IP” so I reset it as “ip”). Then I had to click “Update Settings and Redraw”. Then I went back to my screen that was already displaying my map and click to “refresh”.

    That seemed to take care of it for me. I hope it’s as straight forward for you.

    Best wishes,

    – Nelson

    PS – tmb, I still would like to get the big map to pop up separately instead of at the bottom of my existing map page, if possible. See my #70 posting for my experience with zoom.js. (Thanks :o)

  31. #67615
    73

    Hey,

    @Nelson: That Line14 thing was my mistake. I was using a different version on my server than you and totally forgot about it … LOL. I checked your version and here is what you have to change:
    Line 193 change from
    ipccp_zoomStyleSheet.setAttribute
    ('href','/wordpress/wp-content/plugins/ipccp/zoom/zoom.css');

    to
    ipccp_zoomStyleSheet.setAttribute
    ('href','/wp-content/plugins/ipccp/zoom/zoom.css');

    and the similarly Line 242 from
    ipccp_loadPreloader.src
    = '/wordpress/wp-content/plugins/ipccp/zoom/ZoomProgress.png';

    to
    ipccp_loadPreloader.src
    = '/wp-content/plugins/ipccp/zoom/ZoomProgress.png';

    You can see the pattern: you have to get rid of the reference to the (in your case) not existing folder “wordpress” . Sorry about the confusion. Oh and what’s your Log/Lat-values? I’ll try it here to see what’s wrong there


    @Poppa: Thanks for trying. What are those “generating messages appears at the bottom” you are referring to. Please post the output here so we can figure out what’s happening.


    @Tim: Nelson posted his solution in nr.67 – it was a spelling mistake as the correct column was spelled “ip” and not “IP” (lower case letters!).

    hope this helps,
    cheers,
    -tmb

  32. #67614
    72

    Hi

    Just wondering how Nelson fixed his problem with the IPs not being picked up.

    All I am getting is:

    Cluster Map Generation Started
    0s >> Setting up GeoIP DONE
    1s >> Fetching database entries (SELECT IP FROM wp_makingitupCounterize) DONE (5 entries)
    1s >> finished fetching 0 entries
    1s >> Finished with additional drawings
    Done generating a new cluster map

    I have checked the db and they sure look like IPs to me.

  33. #67613
    71

    Great plugin and I really do hope that we can get this thing to work for me! Sorry, I’m another neophyte WP’er and have spent the last two days trying to fight my way through this.

    Yesterday, I was able to get IPCCP and counterize installed only to realize that there was a WHOLE lot more involved than typical plugins. After working through the MySQL documentation for a few hours and adding the IP_Counterize table to my established DB was I finally able to get counterize up and running.

    And this is where I am stuck. Though the only IPs in counterize are mine (about 20) and IPCCP appears to be properly configured, it seems that IPCCP dumps whenever I select Update Options & Redraw. The message “Settings Saved” appears across the top of the page and generating messages appears at the bottom, nothing ever does show up, even after waiting about 10 minutes. Again, less than 40 hits according to counterize, so I would’ve guessed less than a minute to generate, as seen from the examples below.

    Any ideas?

    Cheers!!
    PB

  34. #67612
    70

    Hi tmb –

    Thanks so much for helping with this. Yes, happily, my map is beginning to look like a mild case of measles. (Two spots so far in Deutschland, not sure which is yours. :o)

    I looked in zoom.js and I didn’t see anything about the PlugInPath. Here’s what I have for zoom.js lines 11 to 24 inclusive:

    var zoomAnimationWaitTimer = null, zoomAnimationTimer = null, zoomAnimationFrame = 0;
    var isFirstZoom = true;

    function ipccp_getScrollY() {

    if (self.pageYOffset) { return self.pageYOffset; }
    else if (document.documentElement && document.documentElement.scrollTop) { return document.documentElement.scrollTop; }
    else if (document.body) { return document.body.scrollTop; }

    return 0;

    }

    I tried adding “var PlugInPath = ‘/wp-content/plugins/ipccp’;” at line 14 but it didn’t seem to make a difference.

    So, as close as I’ve gotten, I’m still not quite there yet. . .

    Also, I’m curious about the “Add my place” function. I’ve specified both my longitude and latitude, but there is only a vertical line that runs up and down at my longitude. Nothing to indicate where my latitude is except that I have a red dot. But that’s from my own IP in the database, right? So I’m a bit confused here, too.

    Thanks again, tmb, and cheers,

    – Nelson

  35. #67611
    69

    Hey Nelson,

    looks about right now. I see some smal dots all over you map (I definitely could see the place where I live ;) As far as the big image is concerned, there’s a pretty simple solution:
    http://inrockland.us/wordpress/wp-content/plugins/ipccp/zoom/zoom.css not found
    http://inrockland.us/wordpress/wp-content/plugins/ipccp/zoom/ZoomProgress.png not found

    looks like you are not using the standard WordPress-folder. Instead it seems like you’ve got all your WordPress stuff in your main directory. But don’t worry! All you have to change is line 14 in your ipccp/zoom/zoom.js file from:
    var PlugInPath = '/wordpress/wp-content/plugins/ipccp';
    to
    var PlugInPath = '/wp-content/plugins/ipccp';

    at least I think this should do the trick :)
    cheers,
    -tmb

  36. #67610
    68

    Oooops! Never mind! I just had to refresh the page a second time. Sorry. All functional — YAY!

    This is so, so COOL!

    I’d still like to be able to have the large map pop out (like target=”_blank”) rather than appear at the bottom of the http://inrockland.us/visitors/ page as it does now. Any way to achieve this?

    Thanks again, tmb, I’m very pleased with this. :o)

  37. #67609
    67

    Hey tmb –

    Thanks for having a look at this. OK, the first part of my problem is that I needed the “remote IP field name” to be specified as “ip” not IP”. Done.

    Now I get…

    Cluster Map Generation Started
    0s >> Setting up GeoIP DONE
    0s >> Fetching database entries (SELECT ip FROM wp_statpress) DONE (63 entries)
    0s >> finished fetching 63 entries
    0s >> Grouping entries by unique IPs
    0s >> Grouping entries by unique IPs DONE (9 unique IPs)
    0s >> Beginning with IP lookup
    0s >> finished grouping IPs into 8 unique places
    0s >> Rearranging some values DONE
    0s >> Beginning to sort places by number of visits DONE
    0s >> Beginning clustering
    0s >> finished clustering into 7 cluster
    0s >> Finished allocation 11 colors
    0s >> Beginning to draw DONE
    0s >> Finished with additional drawings
    Done generating a new cluster map

    …but I still have no clusters showing. Also, now it generates the large map at the bottom of the page where my small map is located ( http://inrockland.us/visitors/ ). I’d really like the large map to pop out a new page instead of showing up on the small map page. Any way to adjust settings for this?

    Many thanks.

  38. #67607
    66

    Hey Nelson,

    thanks for trying the plugin. You got a couple things mixed up there. First of all, IPCCP should get it’s entries from a WordPress database containing IP numbers. In your case you are using the field “IP” in the table “wp_statpress”. Judging from here, it seems like even though there’s 42 entries in that table, none of them is a valid IP. Usually the first lines should looks something like:

    1s >> Fetching database entries (SELECT IP FROM wp_Counterize) DONE (187430 entries)
    [...]
    15s >> finished fetching 187430 entries

    As to logfiles: IPCCP can also fetch the IP numbers from logfiles. You will need access to your logfile on your server to do so (wouldn’t be much help to you if you used the vimagic-logfile ;-) As logfiles come in all kind of formates, parsing them is somewhat of an issue. The PHP/rexp-savvy may use their own logfile filter if the build in one doesn’t work properly. In your case it’s probably best to untick the “include logfile” and leave the two fields in the settings blank. Especially if you’ve entered anything in the second field that may explain why all your 42 (possibly correctly fetched IPs) get rejected.

    let me know how it went,
    cheers,
    -tmb

    ps @Paradox: neat idea, even though I’m not much of a Google fanboy, I admit there’s some charm in the idea. I’ll keep it in mind for a future release (see ToDo list).

  39. #67606
    65

    Hi — I don’t get any errors when I generate my cluster map, but I also don’t get any clusters displayed ( http://inrockland.us/visitors/ ). It’s a brand new blog and has only my own and a couple of other IP hits, but I set the Cluster Mode min visits to = 1 so it should show other visitors, I would have thought. Also, it is not showing me (I set “add my place” for the correct long & lat). And I can’t see how to get it to click to display the larger map. (Do I have to manually set the small image at http://inrockland.us/visitors/ to be a graphic link to the large map? I can do that, but I’m not sure that is the intended functionality.) Nor can I figure out how to set up the log file. I have no logfile_filter.php anywhere to modify and I don’t know what path to set for vimagic since I don’t see it anywhere either.

    Dazed and confuzed — but hopeful! :oP

    Here’s the Generating New Cluster Map feedback:

    Cluster Map Generation Started
    0s >> Setting up GeoIP DONE
    0s >> Fetching database entries (SELECT IP FROM wp_statpress) DONE (42 entries)
    0s >> finished fetching 0 entries
    0s >> Finished with additional drawings
    Done generating a new cluster map

    Thanks for any guidance.

    – Nelson

  40. #67605
    64

    Looks good, but if there would be any way to make it use google maps, that would be even better.

  41. #67596
    63

    Hey Eduardo,

    don’t worry about the emails – I’m happy to help. I found your problem: you are using “Counterize II” which as of version 2.13.0 does NOT store IP numbers anymore
    (see counterize.php:
    New in 2.13.0
    - no more ip-logging (this is illegal in some countries e.g. Germany)
    counterize stores only a small hash to distingiush between two users
    and to get information about the user count)

    Hence you can not use IPCCP. You need either “Counterize”
    http://andersdrengen.dk/projects/counterize/ or use an older version of “Counterize II” if you want to use IPCCP.

    cheers,
    -tmb

  42. #67595
    62

    Sorry for my boring e-mails, but I don’t know what happen with my IPCCP! I
    updated my blog with your last ipccp.php, but was not success.

    I’m sending in attachment a zip file with my folder ipccp into my blog and a
    screenshot of my configuration (screenshot_Eduardo.jpg).

    Please, Can you help me? This is my first experience with IPCCP and Blogs
    and I have too many doubts.

    Others information that I think are important:

    - WordPress: 2.5.1 (Portuguese)
    - My Themes doesn’t use widgets

    Thanks a lot,

  43. #67594
    61

    I’m sure we can figure this out. From here it looks like there might be some issue with the setup. Have a look at my ClusterMap generation log:

    0s >> Loading GeoIP into memory DONE
    1s >> Fetching database entries (SELECT IP FROM wp_Counterize) DONE (187430 entries)
    [...]
    15s >> finished fetching 187430 entries
    15s >> Grouping entries by unique IPs
    16s >> Grouping entries by unique IPs DONE (37708 unique IPs)
    16s >> Beginning with IP lookup
    [...]
    194s >> finished grouping IPs into 9748 unique places
    194s >> Rearranging some values DONE
    194s >> Beginning to sort places by number of visits DONE
    194s >> Beginning clustering
    [...]
    573s >> finished clustering into 1492 cluster
    573s >> Finished allocation 12 colors
    573s >> Beginning to draw DONE
    582s >> Finished with additional drawings
    Done generating a new cluster map

    Important is the line “finished fetching 187430 entries” which in your log reads “finished fetching 0 entries”. Basically this means, that IPCCP couldn’t find any IPs in your database. I’ve attached a special debugging version for you – try this one. After init and loading it should say something like:

    1s >> Fetching database entries (SELECT IP FROM wp_Counterize) DONE (187432 entries)
    5000 database entries processed (5000 relevant IPs found)

    Especially the number in the brackets is important. It givens the number of relevant IPs found in the last verified IPs. Let me know how your output looks like. And just to make sure: You are using Counterize and not Counterize II for example?

  44. Eduardo Heron Santos
    #67593
    60

    Dear Thomas,

    Thanks a lot for your help, but I can’t see the map with marks. Look this
    message:

    Cluster Map Generation Started
    0s >> Loading GeoIP into memory DONE
    0s >> Fetching database entries (SELECT IP FROM wp_Counterize) DONE (6282
    entries)
    0s >> finished fetching 0 entries
    0s >> Finished with additional drawings
    Done generating a new cluster map

    And nothing to do! What’s happened? I’ve been try to see the map in FireFox
    and IE 6!!!

    Tks,

  45. #67592
    59

    Hey George,

    as far as programming goes, it’s a rather simple feat. but as I’ve written in the ToDo-List (last item), all I’m waiting for are some license free maps (or someone that is willing to donate a map to the cause). Or do you just want to “crop” the existing map? Hmm…

    cheers,
    -tmb

  46. George
    #67591
    58

    Is it possible to split the map up into different regions? I’d like to display the map in my sidebar, but due to space issues I’d like to have North America, Europe, etc, separate… can this be done?

    Thanks,,

  47. #67580
    57

    Hey Eduardo,

    thanks for the feedback. The problem you have is a simple one: GeoIP rejected a faulty lookup call. Somewhere in your database the string “4ce21b21887f050e” got entered for an IP number (or maybe you’ve got the wrong database/table/key combination?). Anyway so far IPCCP assumed to receive only correctly formatted IPs. Big assumtion coming from a lazy programmer ;) It should be fixed now.

    While I was at it I also speeded things up somewhat major. Hence the new version is recommended for everybody.
    cheers,
    -tmb

  48. Eduardo Heron Santos
    #67578
    56

    Friends,

    First of all, congratulation to Mr.Thomas M. Bösel for this perfect plugin. I need a help to use the IP City Cluster. I installed in my blog, but there are an erros. Look at below:

    //////////////////////////////////////
    PHP Fatal error: Uncaught exception ‘Exception’ with message ‘Invalid IP address: ’4ce21b21887f050e” in E:\home\nandagaucha1\Web\wp-content\plugins\ipccp\GeoIP\GeoIP.php:507 Stack trace: #0 E:\home\nandagaucha1\Web\wp-content\plugins\ipccp\GeoIP\GeoIP.php(538): Net_GeoIP->lookupCountryId(’4ce21b21887f050…’) #1 E:\home\nandagaucha1\Web\wp-content\plugins\ipccp\ipccp.php(721): Net_GeoIP->lookupCountryName(’4ce21b21887f050…’) #2 E:\home\nandagaucha1\Web\wp-content\plugins\ipccp\ipccp.php(1238): WpIPCCP->_recluster() #3 E:\home\nandagaucha1\Web\wp-content\plugins\ipccp\ipccp.php(1329): WpIPCCP->_options_form() #4 [internal function]: ipccp_options_form(”) #5 E:\home\nandagaucha1\Web\wp-includes\plugin.php(311): call_user_func_array(‘ipccp_options_f…’, Array) #6 E:\home\nandagaucha1\Web\wp-admin\admin.php(55): do_action(‘opcoes_page_ipc…’) #7 E:\home\nandagaucha1\Web\wp-admin\options-general.php(2): require_once(‘E:\home\nandaga…’) #8 {main} thrown in E:\home\nandagaucha1\Web\wp-content\plugins\ipccp\GeoIP\GeoIP.php on line 507
    //////////////////////////////////////

    What’s wrong? It’s look like that the field IP in database is not correspond as the same in GeoIP. I saw here (43rd Post) that Erik had the same problem, but I cound not see the solution.

    Thanks a lot

    Eduardo

  49. #66370
    55

    hi. Thanks for plugin

    perfect.

    regards

  50. #66298
    54

    Thanks, this plugin is fantastic. I have one problem, I also use Global Translator which when your plugin is activated causes several copies of the translated page to be produced (one on top of the other in the browser). I have about 20 other plugin activated and all work fine. Any thoughts please?

  51. #61739
    53

    Hi there,

    This is some pretty cool thing you got going here. Gonna check out the remaining site pages to see if there are any updates. ;)

    Cheers! :)

  52. Zenith
    #57860
    52

    Finally got it running. Got around the crippled imagejpeg with imagegif (png is too large). One question: I wonder why imagecopyresized() is used for resizing? imagecopyresampled() seems to be a much better substitute.

  53. Zenith
    #57830
    51

    Turns out it’s not a “serious” problem, like I fear that such as unable to parse the GeoIP database, or retrieving the ip table from counterize etc. The script hanged at

    $im_clustered=$this->_LoadJPG($this->loadFile);

    Which I felt strange. When I commented out this line, the program “works fine” until the image processing part, which means the data retrieving and clustering went on without problem. I’ll try my best to debug this.

    Also the script complained “Call to undefined function utf8_encode()”, the server’s php5 functionality seems to be very crippled.

  54. Zenith
    #57790
    50

    Hi, I got into some trouble trying to make this plugin work.
    Originally I have the same error caused by PHP4. My service provider claimed that their server is compatible with PHP5, and all I need is to put in an .htaccess file at my web root which says
    AddType application/x-httpd-php5 .php

    Anyway, the error message is gone and I can activate the plugin. But now at the Options screen, when I click Update Settings and Redraw, it never gets pass
    0s >> Setting up GeoIP

    Has this problem occured to anyone else? (I tried Higher performance and Memory efficient)

  55. #57073
    49

    Well I have a hosting account at Godaddy which lists PHP Version 5.2.5 and PHP Version 4.3.11

    Version 4 uses php.ini and version 5 uses php5.ini, so maybe it’s calling PHP version 4 when it should do 5?

    It’s a virtual private server running Linux/Apache (sorry I don’t know the versions)

  56. #57063
    48

    hey drbuzz0,

    as written in the FAQ above, this error happens whenever you try to run the plugin on an PHP4 Server. Are you positive your site is running PHP5 or better?

    cheers,
    -tmb

  57. #57004
    47

    Well I’m getting a “Parse error: syntax error, unexpected ‘)’, expecting ‘(‘” on line 644 and I’m absolutely certain that my PHP and wordpress versions are up to date (i’ve checked about a dozen times!)

  58. #10695
    46

    Actually, It can’t show the image map if I turn on the option “show cluster names” o.O

  59. #10683
    45

    I have installed everything apparently successfuly. It is a really, really great plugin, you should charge for it ;D

    I am having two little problems:

    First, IPCCP can’t insert the image map into the template I am using now. Weird, because it shows the map in other templates.

    Second, when it shows image maps (into other templates), IPCCP shows the big image in the page footer. Is there some way to solve this (I already changed the .js path, removing ‘/wordpress’ prefix, but it didn’t solve the problem).

    Thanks a lot,
    Rodrigo.

  60. #3439
    44

    Hey Erik,
    thanks for the bug-report. looks like there’s an unexpected formatting for the IP ( 10.0.4.99, 193.2). I’ll have a look into that and will modify the plug-in to filter those entries.
    cheers,
    -tmb
    ps: sorry for the late answer, was afk for two weeks.

  61. Erik
    #2891
    43

    Hi there,

    Great plug in. But I’m getting error messages. What does this mean?

    Cluster Map Generation Started
    0s >> Setting up GeoIP DONE
    1s >> Fetching database entries (SELECT IP FROM blogthis_firestats_hits) DONE (12788 entries)
    2s >> finished fetching 12788 entries
    2s >> Grouping entries by unique IPs
    2s >> Grouping entries by unique IPs DONE (3072 unique IPs)
    2s >> Beginning with IP lookup

    Fatal error: Uncaught exception ‘Exception’ with message ‘Invalid IP address: ’10.0.4.99, 193.2” in /var/www/imbloggingthis/wp-content/plugins/ipccp/GeoIP/GeoIP.php:503 Stack trace: #0 /var/www/imbloggingthis/wp-content/plugins/ipccp/GeoIP/GeoIP.php(534): Net_GeoIP->lookupCountryId(’10.0.4.99, 193….’) #1 /var/www/imbloggingthis/wp-content/plugins/ipccp/ipccp.php(721): Net_GeoIP->lookupCountryName(’10.0.4.99, 193….’) #2 /var/www/imbloggingthis/wp-content/plugins/ipccp/ipccp.php(1238): WpIPCCP->_recluster() #3 /var/www/imbloggingthis/wp-content/plugins/ipccp/ipccp.php(1329): WpIPCCP->_options_form() #4 [internal function]: ipccp_options_form(”) #5 /var/www/imbloggingthis/wp-includes/functions.php(1300): call_user_func_array(‘ipccp_options_f…’, Array) #6 /var/www/imbloggingthis/wp-admin/admin.php(57): do_action(‘options_page_ip…’) #7 /var/www/imbloggingthis/wp-admin/options-general.php(2): require_once(‘/var/www/imblog…’) #8 {main} thrown in /var/www/imbloggingthis/wp-content/plugins/ipccp/GeoIP/GeoIP.php on line 503

  62. #2500
    42

    Hey Daniel,
    please try the latest version. Judging by this image:
    http://tricolore.ca/wordpress/wp-content/plugins/ipccp/images/ipccp_out_big.jpg
    you are still running v0.b5. I just uploaded v0.b5.6. Which way are you using the access the image (token or PHP-call)? I checked your page and noticed, that the image map didn’t get inserted in your page-code. Let’s see if the current version fixes that.
    cheers,
    -tmb

    ps: I also noticed, that you are linking to this file, which I guess you wanted to be this file. Don’t know whether this is intentional, but it keeps generating an error message while loading your page.

  63. #2475
    41

    Hi there.. Great plugin, but I can’t seem to figure out how to display the image properly so that it can show the zoomed image when clicked on it, and show the details of each cluster.

  64. #2349
    40

    i think it’s not the file permission, but rather the folder permissios. maybe you could check the wordpress, wp-content und plugin folders?

  65. #2339
    39

    “Are you sure, that after the upgrade all the file permissions are still intact?” Yep, permission is 777 in the imagemap. Yesterday I removed the call from the footer, but now I’ve returned it. But result is now that I see you’re map, not mine. Somehow ipccp doesn’t generate a new map (or one with zero bytes).
    y

  66. #2314
    38

    Hey Adrianus,
    sorry for the late answer, I was gone for the weekend. I noticed that you copied the images. After rerunning the plug-in nothing got saved. Are you sure, that after the upgrade all the file permissions are still intact?
    cheers,
    -tmb

  67. #2284
    37

    Your suggestion didn’t help (that is: “Maybe I would help, if you replace the four images in …/ipccp/images/ with the original ones (and then rerun the calculations)?”). The logefile says:

    0s >> Setting up GeoIP DONE
    0s >> Fetching database entries (SELECT IP FROM wp_Counterize) DONE (7218 entries)
    0s >> finished fetching 7218 entries
    0s >> Grouping entries by unique IPs DONE (2152 unique IPs)
    0s >> Beginning with IP lookup
    1000 IPs done
    2000 IPs done
    4s >> finished grouping IPs into 449 unique places
    4s >> Rearranging some values DONE
    4s >> Beginning to sort places by number of visits DONE
    4s >> Beginning clustering
    50 cluster
    100 cluster
    150 cluster
    6s >> finished clustering into 188 cluster
    6s >> Finished allocation 9 colors
    6s >> Beginning to draw DONE
    6s >> Finished with additional drawings

    So everything seems OK, but still the generated map is 0 Kb.

  68. #2261
    36

    Hey Adianus,
    After your comment I upgraded and the transition from WP2.1 to WP2.1.2 didn’t change a thing for me. So lets try to figure out, what happened at your place. I noticed, that the image gets loaded, but has a file size of 0byte. Also these two pictures seem to get generated correctly (Mar-3 0:08:39 CET)
    http://www.astroblogs.nl/wp-content/plugins/ipccp/images/ipccp_out.jpg
    http://www.astroblogs.nl/wp-content/plugins/ipccp/images/ipccp_out_smal.jpg

    I don’t know why the other picture doesn’t get saved correctly. Maybe I would help, if you replace the four images in .../ipccp/images/ with the original ones (and then rerun the calculations)?
    cheers,
    -tmb

  69. #2260
    35

    I upgraded WordPress today (2.11 > 2.1.2). Now the IPCCP-map is gone. I didn’t touch the plugin-folder, so what happened?

  70. #2052
    34

    Hey Carlos,

    your webserver is not running on PHP5, which is required for GeoIP to work. Please upgrade (or ask you provider whether PHP5 is already available) and everything should work fine.

    cheers,
    -tmb

  71. Carlos
    #2050
    33

    I have this Message if i activatet our Script in WP 2.0.7

    Parse error: syntax error, unexpected ‘)’, expecting ‘(‘ in / www/ htdocs/ ipptrave/ wp-content/ plugins/ ipccp/ ipccp.php on line 504

    Whats wrong ??

    Regards Carlos

  72. #2023
    32

    Hey Peter,
    thanks for the pointers! I changed the Setup text above and the remote IP field description. Funny though that the default values are zero – they get initialised to 1000px and 2000px here. I’ll look into that again. As for the output: in the admin options panel, the last section should be the preview, which gets printed by the _output() call in line 1074 (v0.b5.3). Come to think of it, could it be that your template got initialised empty as well? The default value should be:
    <div align="center"><img src="%IPCCP_MIN%" %WIDTH_MIN% %IMAGEMAP% alt="%BLOGNAME% Cluster Map" border="0" /></div>
    If the template is empty, of course nothing will be return. If the template is not empty, does it show up in a post (that’s got the token [IPCCP] in it)?
    thanks for the suggestions,
    -tmb

  73. #2018
    31

    Okay — I think I got it. The default installation has blanks for those entries (interpreted as zeros, no doubt). As soon as I put reasonable values in, the plugin started working.

    I got confused by the note above that says “Make sure the webserver has write permissions on those /images/ipccp_out* files.” The leading slash made me think it was at the root level of the WordPress installation, not the root level of the plugin’s installation.

    One suggestion for a wording change that initially tripped me up. At the top of the Options screen one is prompted for “Referer field name.” That had me confused with the stats plugin’s HTTP Referer field, which is different of course than the field containing the remote IP address.

    Now I just can’t seem to get the preview to appear at the bottom of the Options screen. The graphics are generated without error, but there isn’t an IMG tag included in the generated Options screen to load the world map graphic.

  74. #1991
    30

    Hey Peter,
    I’m a bit confused there. You shouldn’t have to create any folder. IPCCP comes with the image folder (where the source files is as well). All cluster map images will be created within that folder (as is all the linking done automatically from that folder). The webserver needs access to those files.
    In this error message Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in …wp-content/plugins/ipccp/ipccp.php on line 677 it claims to have been called with invalid dimensions. What are your size settings for the preview and the zoomed image? The only time I got that error message was by setting these values to zero (or any non positive integer value).
    cheers,
    -tmb

  75. #1989
    29

    I’m seeing errors when trying to generate the first cluster map. A clipping from the log at the bottom of the options page looks like this:

    40s >> finished clustering into 1085 cluster
    40s >> Finished allocation 2 colors
    40s >> Beginning to draw DONE
    42s >> Finished with additional drawings

    Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in …wp-content/ plugins/ ipccp/ ipccp.php on line 677

    Warning: imagecopyresized(): supplied argument is not a valid Image resource in …wp-content/ plugins/ ipccp/ ipccp.php on line 678

    Warning: imagedestroy(): supplied argument is not a valid Image resource in …wp-content/ plugins/ ipccp/ ipccp.php on line 679

    Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in …wp-content/ plugins/ ipccp/ ipccp.php on line 682

    Warning: imagecopyresized(): supplied argument is not a valid Image resource in …wp-content/ plugins/ ipccp/ ipccp.php on line 683

    Warning: imagedestroy(): supplied argument is not a valid Image resource in …wp-content/ plugins/ ipccp/ ipccp.php on line 684

    I have created the /images directory at the top of the WordPress installation and the web server has permission to write to it. All of the settings in the Options page are the defaults.

    This looks really cool — I hope I can get it to work!

  76. #1976
    28

    No worries mate, glad I could help and that we worked everything out. Thanks for the continuous feedback.

  77. #1974
    27

    It works! I adjusted zoom.js and now everything is OK. Thanx for all your help with this! One question: is it possible to see the cities in the zoomed image? Now you can only see the city names + hits in the preview.

  78. #1967
    26

    Hey Adrianus V,
    I just checked your page. When clicking it actually does show up at the bottom on the page. That’s because it couldn’t load these two resources:
    http://www.astroblogs.nl/wordpress/wp-content/plugins/ipccp/zoom/zoom.css
    http://www.astroblogs.nl/wordpress/wp-content/plugins/ipccp/zoom/ZoomProgress.png
    That’s because you don’t have the original WordPress folder structure anymore. Don’t worry, just edit the /wp-content/plugins/ipccp/zoom/zoom.js. In lines 193 and 242 you’ll find the two paths. Delete the leading /wordpress in those two paths and everything should work fine. Looking forward to seeing it in action!

    cheers,
    -tmb

    ps: line 242 for example should look something like:
    ipccp_loadPreloader.src = '/wp-content/plugins/ipccp/zoom/ZoomProgress.png';

  79. #1966
    25

    Ok, I put into my footer and the map appears. But when I click to zoom nothing happens. How can I get the big map?

  80. #1959
    24

    Servus Adianus V,
    just leave the template at it’s default value for now. All you have to do is add [IPCCP] to any post or page. The plug-in will find that string and substitute it for the values in your template (including the picture).
    cheers,
    -tmb

  81. #1957
    23

    I’m improving! I’ve installed counterize. Great plugin. I hope there is a way to import my old data. Now my counter is back to zero :-(
    With IPCCP the maps is generated, but I don’t get a preview on my site. I suppose I have to use the output template: .

    Do I have to adjust the %parameters%? (you’ve noticed I’m not an expert in programming).

  82. #1952
    22

    Hey Adianus V,

    it says WordPress database error: [Table ‘astroblogs.wp_Counterize’ doesn’t exist] – I take it you don’t have Counterize installed? You will need some statistics plug-in that keeps track of the User-IP. Pretty much any of the common plug-ins will do that for you. Another method would be by using the servers logfile, but I don’t know whether this is available to you.

    cheers,
    -tmb

  83. #1950
    21

    the new version (0.b5.2) gives better results! I now have an admin-panel and can finetune parameters. But after generating an image I receive the following message at the footer:

    Cluster Map Generation Started
    0s >> Setting up GeoIP DONE
    0s >> Fetching database entries (SELECT IP FROM wp_Counterize)
    WordPress database error: [Table 'astroblogs.wp_Counterize' doesn't exist]
    SELECT IP FROM wp_Counterize

    DONE (0 entries)
    0s >> finished fetching 0 entries
    0s >> Finished with additional drawings
    Done generating a new cluster map

    And at my site no picture is visible.

  84. #1951
    20

    Due to the rather long render times with large data sets, giving some feedback while generating a new cluster map. The output will be visible when generated by pressing “Update & Redraw” in the admin panel and will look something like this:

    Cluster Map Generation Started
      0s >> Loading GeoIP into memory DONE
      0s >> Fetching database entries (SELECT IP FROM wp_Counterize) DONE (15700 entries)
      1s >> Beginning to process logfile (.../wp-content/plugins/ipccp/ips_from_logfile.txt)
             200000 lines read
             400000 lines read
             [...]
             2800000 lines read
             2865176 lines read
             100000 lines processed (100000 relevant IPs found)
             200000 lines processed (200000 relevant IPs found)
             [...]
             2800000 lines processed (2800000 relevant IPs found)
             2865175 entries kept
    183s >> finished fetching 2880875 entries
    183s >> Grouping entries by unique IPs DONE (45575 unique IPs)
    186s >> Beginning with IP lookup
             1000 IPs done
             2000 IPs done
             [...]
             44000 IPs done
             45000 IPs done
    411s >> finished grouping IPs into 5677 unique places
    411s >> Rearranging some values DONE
    411s >> Beginning to sort places by number of visits DONE
    411s >> Beginning clustering
              50 cluster
             100 cluster
             [...]
             650 cluster
    472s >> finished clustering into 657 cluster
    472s >> Finished allocation 9 colors
    472s >> Beginning to draw DONE
    474s >> Finished with additional drawings
    Done generating a new cluster map

  85. #1940
    19

    Ok, looks like we’ve »corrected« too much ;) Activation alone should NOT cause any errors! Hold on till I release v0.b5.2 tonight and lets try again.

    [Update] I found the mixup that could cause a recluster call at the first activation of the plug-in and fixed it. my bad!

  86. #1939
    18

    It’s just MySQL I’m using. I’m not getting an admin-panel of IPCCP because after activating the plugin the site collapses. That is, the site as well as wp-admin. Renaming the map IPCCP into IPCCP1 restores my site. Do I have to specify somewhere a database name and IP field key?

  87. #1937
    17

    you shouldn’t need to! that line fetches the data from the User specified database. Q: have activated the plugin in the admin panel? Entered (&saved) your information in the options form? BTW: which statistics database are you using? The below mentioned error should only occur if you try to generate an image without specifying database name and IP field key.

  88. #1936
    16

    Line 336 says: $sql = ‘SELECT ‘.$this->user_table_key.’ FROM ‘.$this->user_table_name;

    Do I have to change this?

  89. #1935
    15

    That’s actually good, because it means your memory problems are solved (for now). What happens now is, that you don’t actually have any return results from your database SELECT FROM should look something like SELECT 'IP' FROM 'wp_counterize'. Check whether your IPCCP settings are correct (correspond to your statistics database).

    Thanks for the report – I’ll add some code catching empty returns.

  90. #1934
    14

    I changed the string Net_GeoIp::MEMORY_CACHE into Net_GeoIp::STANDARD. But this caused a long list of errors:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM' at line 1]
    SELECT FROM

    [...] []

  91. #1920
    13

    we are getting there ;) I doubt that this error has anything to do with the run time. PHP is pretty specific there (you can try by setting it to some really low value and you’ll get something like Maximum execution time of 10 seconds exceeded) I actually think, that indeed the script is running out of memory. Your provide probably has a rather low value set per user. If you care to try find this string Net_GeoIp::MEMORY_CACHE and change it to Net_GeoIp::STANDARD. I never though that someone might run out of memory (these days ;) Lets see whether that does the trick. I’ll implement an user option whether to run memory efficient or performance optimised in the next (sub)release.

    [Update] just did a little comparison. Reading from a 352.410.753 byte logfile with no filter processing time increased from 400s to 521s when using the non cached GeoIP database call.

  92. #1915
    12

    Oeps, next error. My server was upgraded today to PHP 5. But when activating IPCCP I got the following error:

    Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 19441809 bytes) in /storage/ mijndomein/ users/ 032386/ public/ sites/ http://www.astroblogs.nl/ wp-content/ plugins/ ipccp/ GeoIP/ GeoIP.php on line 361

    Has this something to do with an exceding of the maximum PHP execution time?

  93. #1857
    10

    Glad we figured that out! It’s not the first time that ppl thought they were running on a different system. I don’t even know why them providers keep dragging their feet. Oh well – hope it all works out soon. Thanks for the quick answer!
    cheers,
    -tmb

  94. #1846
    9

    Yes, that’s the reason: my server isn’t running on PHP5! My host recently said that per february 6th everyone should work under PHP5, but that was for new users. The rest has to request an upgrade. So therefore I just asked them to upgrade to PHP5. I’m now still running 4.3.

  95. #1845
    8

    This is my result of the test:
    Parse error: parse error, unexpected ‘)’, expecting ‘(‘ in / storage/ mijndomein/ users/ 032386/ public/ sites/ http://www.astroblogs.nl/ wp-content/ plugins/ ipccp/ geoip_tester.php on line 3

    :-(

  96. #1842
    7

    Concerning the line 329 error,

    so far using PHP4 is the only reason that error occured with me. Try this little script from within the IPCCP folder:
    < ?php
    require_once "GeoIP/GeoIP.php";
    $geoip_country = Net_GeoIP::getInstance("GeoIP/GeoIP.dat", Net_GeoIp::MEMORY_CACHE);
    $geoip_city=Net_GeoIP::getInstance("GeoIP/GeoLiteCity.dat",Net_GeoIp::MEMORY_CACHE);
    print phpversion()."\n";
    ?>

    When run under PHP4:

    root% php4 geoip_tester.php
    Parse error: parse error, expecting `'('' in /blog.vimagic.de/ Net_GeoIP_TestEnv/ geoip_tester.php on line 3

    When run under PHP5:

    root% php5 geoip_tester.php
    5.1.5

    otherwise I’ve got no clue why the GeoIP call should fail.
    hmmm,
    -tmb

  97. Michiel
    #1840
    6

    Tried to install your plugin on my WP2.1 test environment but when activating I got the following error:

    Parse error: syntax error, unexpected ‘)’, expecting ‘(‘ in / home/ mysite/ public_html/ wptest/ wp-content/ plugins/ ipccp/ ipccp.php on line 329

  98. #1839
    5

    ehhh…. my server IS running PHP 5! So that’s not the reason. What else can it be?

  99. #1814
    4

    hey Adrianus V,

    that’s most likely a PHP error. I take it your server is running with PHP4 or something. GeoIP requires PHP5. Sorry about that! Update PHP (ask your provider, maybe they are running both versions) and it should work fine!

    thanks for testing,
    -tmb

  100. #1812
    2

    Hi,

    I’m using clustrmaps, but your plugin sounds very useful! But when I activated the plugin I got an error:
    “Parse error: parse error, unexpected ‘)’, expecting ‘(‘ in /storage/ mijndomein/ users/ 032386/ public/ sites/ http://www.astroblogs.nl/ wp-content/ plugins/ ipccp/ ipccp.php on line 329″

    Do you know what’s causing this?

    Grz,

    Adrianus V (from the Netherlands)

  1. #80935
    105

    [...] pengunjung blog. Mulai dari tracking lokasi asal pengunjung dan memvisualisasikannya dalam peta: IP City Cluster, WordPress Geotrack, WP GuestMap, Visitors Map Generator, ClustrMaps, Whos Amung Us; menampilkan [...]

  2. #75045
    104

    [...] Are people from? IP City Cluster WordPress-Plugin Commenter [...]

  3. #1886
    11

    [...] IP City Cluster erstellt eine geographische Karte mit Zugriffspunkten der einzelnen Besucher. Benötigt wird eine Datenbank (oder eine Logdatei), die die IP beobachtet. (No Ratings Yet)  Loading … [...]

  4. #1813
    3

    [...] more info and download…. [...]

  5. #1811
    1

    [...] IP City Cluster generates a geographical cluster map based on where from people access you website. It requires a statistics database (or logfile) that keeps track of the IP. [...]