Contribute  :  Support  :  Downloads  :  Forum  :  Links  :  Polls  :  Calendar  :  Directory  :  Advanced Search  
Geeklog The Ultimate Weblog System
Welcome to Geeklog
Thursday, May 15 2008 @ 11:13 PM EDT
   

Plot your site visitors on a world map

GeeklogI have integrated the IP-Atlas PHP script that geographically plots IP addresses on a graphical map.

It's integrated into GL and I have modified the standard Who's Online block to show the option to "Plot IP" beside your visitors name. It will show all vistors including all the annonymous users. You can modify this if you want.

This is a neat feature the allows you to see where vistors are from. Saves you from scanning logs and looking them up using some other tool to trace IP addresses

You can see the feature at my site here and the block is available in my downloads section

Note: Many GL Users still running pre 1.3.5sr2 sites will have the problem where anonymous vistors sessions are not cleared. There is a quick fix to that but only really shows up on sites that don't have regular registered users signing in. As soon as a registerd user signs in, the older annonymous sessions are cleared. I can post the fix for this if users need it.

Cheers,
Blaine

Story Options

Plot your site visitors on a world map | 10 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
quick session fix?
Authored by: Anonymous on Wednesday, July 24 2002 @ 08:43 AM EDT
hey, i wouldn\'t mind seeing that session fix if you get the chance to post it. thanks.

steVe
quick session fix?
Authored by: efarmboy on Wednesday, July 24 2002 @ 06:47 PM EDT
The section of code in lib-common.php is around line 100. The complete section including the hack/fix is noted in this code block. You should be able to just replace it.

// Handle Who\'s online hack if desired
if (DB_getItem($_TABLES[\'blocks\'],\'is_enabled\',\"name = \'whosonline_block\'\") == 1) {
if (empty($_USER[\'uid\']) OR $_USER[\'uid\'] == 1) {
// The following code handles anonymous users so they show up properly
DB_query(\"DELETE FROM WHERE remote_ip = \'$REMOTE_ADDR\' AND uid = 1\");

// BL: May 18,2002 - Added this next line to clear up older annonymous users
DB_query(\"DELETE FROM WHERE uid = 1 AND start_time < \" . (time() - $_CONF[\'whosonline_threshold\']));

// Build a useless sess_id (needed for insert to work properly)
mt_srand((double)microtime()*1000000);
$sess_id = mt_rand();
$curtime = time();
// Insert anonymous user session
DB_query(\"INSERT INTO (sess_id, start_time, remote_ip, uid) VALUES ($sess_id,$curtime,\'$REMOTE_ADDR\',1)\");
} else {
// Clear out any expired sessions
DB_query(\"DELETE FROM WHERE uid = 1 AND start_time < \" . (time() - $_CONF[\'whosonline_threshold\']));
}
}
quick session fix?
Authored by: Anonymous on Thursday, July 25 2002 @ 11:50 AM EDT

I believe there is a typo in your fix.

// BL: May 18,2002 - Added this next line to clear up older annonymous users DB_query("DELETE FROM WHERE uid = 1 AND start_time

Should be

// BL: May 18,2002 - Added this next line to clear up older annonymous users

DB_query("DELETE FROM { $ _TABLES['sessions'] } WHERE uid = 1 AND start_time
quick session fix?
Authored by: Anonymous on Thursday, July 25 2002 @ 12:45 PM EDT
Yep - looks like it filtered out that important part of the statement when I posted it. Thanks.
Plot your site visitors on a world map
Authored by: Anonymous on Wednesday, July 24 2002 @ 09:08 AM EDT
I think this is a great idea, but it only tracks my ip back to my gateway (NYC) when in fact I live in Chicago.
Plot your site visitors on a world map
Authored by: krove on Wednesday, July 24 2002 @ 10:36 AM EDT
Umm, I\'m in Verdi, Nevada (right next to Reno) and it plotted me somewhere in the mid-west (like Missouri or something)...

It did correctly give my location as Verdi, but the red diamond shows me somewhere on the rolling plains.
???
Plot your site visitors on a world map
Authored by: winnits on Wednesday, July 24 2002 @ 10:42 AM EDT
Heh - it's similar to the "Welcome to our visitors from *blah*' block - it relies on the backend system (in this case at IP Atlas) to correctly determine the location of your IP address. Of course, connecting through proxy's/gateways/etc could make this more inaccurate still - so it's by no means an exact system.

Aside from that, I've installed it and it works a treat :) Couple of uber-picky problems, Blaine, some of the .php files in the archive were set to chmod 751 and wouldn't work until they were 755, and the install text is headed File Management Module - but otherwise - top marks, I love it!

Cheers, Alan
Plot your site visitors on a world map
Authored by: efarmboy on Wednesday, July 24 2002 @ 12:53 PM EDT
Hey thanks Alan, thats what I get for using a previous INSTALL file as my source. I\'ll clean up those two items.

Cheers,
Blaine
Plot your site visitors on a world map
Authored by: Anonymous on Thursday, July 25 2002 @ 12:07 AM EDT
that\'s just the thing - it told me I was in Verdi, NV, which is correct. It did not, however, correctly place Verdi on the map...
Ver 1.1 - slight enhancement
Authored by: efarmboy on Wednesday, July 24 2002 @ 08:48 PM EDT
I never really liked the label I had used \"Plot-IP\" but it was what I came up with at the time. I found a globe icon to use today - which IMHO is a cleaner look.

I\'ve also reformated the block display to use a table and this lines up the icons better (camera for profile photo and now the globe to map visitor)

Additionally, I was testing using a rotating globe or a static gif and in the end decided to use both. Use the rotating GIF for a registered user. What the heck - you decide and modify this piece of the logic if you want.

My site may be slow as it\'s never had this much traffic before. There have been over 40 downloads of this file plus other downloads in the past 24 hours.

Cheers,
Blaine