Keeping it real

While I haven't been paid to write computer programs since 1993, I've always found that maintaining an interest in coding technology and platforms (among other things) has offered great benefits when dealing with developers and especially when debunking IT suppliers' FUD and nonsense. So here's a small hobby project that ticked a number of interesting boxes in 2008 - open source, PHP, JavaScript, web services and geolocation.

world mapHave you come far?

Since I started building hobby web sites in the late 1990's I've had an interest in who visits my sites and how they find their way to them. Since Google Analytics came along it's been easy for webmasters to track this, but one thing that's lacking from an otherwise impressive package is the ability to publish visitor information back to the website itself.

What's so great about open source?

When establishing Cogitant in 2008, I built this quick and simple website with Joomla. Joomla is a free, open-source PHP-based content management system using the similarly free mySQL database. WordPress is a more popular choice for building blog-style sites but I liked the additional flexibility in structure offered by Joomla. Like many open-source frameworks it is designed to be extensible via user-written modules.  A great many have been written and shared - some under free-to-use open-source licenses like GPL, others under commercial licenses.

Standing on the shoulders of ... PHP programmers

Another great advantage of open source software is that as a developer you can easily and legitimately re-use and extend existing functionality and code. My starting point for building a "where are site visitors located" add-on was the built-in Joomla module whosonline which displays how many users are logged on. This provided the structure for my new Joomla module along with working example of how to access the database, display results etc. Joomla has had a few significant structural upgrades since 2008, but in each case it was quite easy to update the modules based on later versions of whosonline. The google maps API has also undergone some changes, but the concept of API versioning at least allows an orderly transition.

I built my geolocation solution as two Joomla modules. One uses a web service (geoplugin.com) to determine approximate location - to the nearest town or country only, based on IP subnet address - and adds this to the site database. The other reads recent locations from the database and uses the Google Maps API to plot approximate locations on a map. Click on the Recent Visitors link on the main menu to see the results.

Yeah whatever. My toaster has geolocation now

The world of location-based services has certainly come a long way, even since I built this add-in in 2008. But while IP-based geolocation is approximate and unreliable, it fits this purpose very well. It doesn't capture or record any more information than is needed for my purpose, which is both efficient and helpful from a data privacy standpoint. It's true modern browsers support accurate location methods via GPS and other dark magic, but these methods return much more precision than we need here, and quite rightly require explicit user consent.

Popular in Russia?

If you are puzzled by the regular visits from distant lands including China, Turkey and Russia, this is where many script-based attacks on websites originate, looking for a weakness that would allow the attacker to take control of the site.  Safe to say that every day someone is trying to break into any internet-connected device you have, so keep those patch levels up to date!

Recent visitors:
Pābna 2026-09-11 04:02:05
Nanjing 2026-09-11 04:06:09
Vecindario 2026-09-11 04:32:14
North Jakarta 2026-09-11 05:16:20
Singapore 2026-09-11 08:10:20
Guangzhou 2026-09-11 10:15:36
France 2026-09-11 10:24:07
Atlanta 2026-09-11 10:24:29
Alfafar 2026-09-11 10:40:07
Riga 2026-09-11 11:33:15
Warsaw 2026-09-11 12:15:13
Dulles 2026-09-11 12:34:21
City of London 2026-09-11 13:11:28
Czechia 2026-09-11 13:35:12
Zug 2026-09-11 13:46:44
Manado 2026-09-11 13:58:31
Falkenstein 2026-09-11 14:47:15
Hong Kong 2026-09-11 15:03:47
Miami 2026-09-11 15:29:44
Slough 2026-09-11 16:22:30
SEMrush Bot 2026-09-11 16:33:19
Dubai 2026-09-11 16:47:39
Tower Hamlets 2026-09-11 17:25:15
The Dalles 2026-09-11 17:43:44
Naples 2026-09-11 18:34:15
North Charleston 2026-09-11 19:21:47
Council Bluffs 2026-09-11 20:49:52
Romania 2026-09-11 22:21:21
Bulgaria 2026-09-11 22:32:19
Ahrefs Bot 2026-09-11 22:37:22
Khobar 2026-09-12 00:36:05
Bangkok 2026-09-23 07:31:37
Tula 2026-09-23 09:20:47
Dhaka 2026-09-23 10:24:49
Huawei PetalBot 2026-09-23 10:31:55
Zarqa 2026-09-23 11:25:16
Russia 2026-09-23 11:33:20
Amsterdam 2026-09-23 11:52:33
Lviv 2026-09-23 12:27:02
New Delhi 2026-09-23 12:37:08
Durban 2026-09-23 13:41:13
Germany 2026-09-23 14:01:02
China 2026-09-23 14:11:04
The Netherlands 2026-09-23 14:11:11
Seoul 2026-09-23 15:04:29
Zurich 2026-09-23 15:43:17
Samarkand 2026-09-23 15:44:32
Boardman 2026-09-23 16:13:34
Nairobi 2026-09-23 16:32:35
Frankfurt am Main 2026-09-23 16:33:06
Baiduspider 2026-09-23 16:50:59
United States 2026-09-23 17:02:22
Toronto 2026-09-23 18:14:59
Roma 2026-09-23 18:46:30
Staffolo 2026-09-23 19:18:03
Tokyo 2026-09-23 21:32:48
Brussels 2026-09-23 22:03:59
Beijing 2026-09-23 22:34:58
Muriaé 2026-09-23 22:56:41
Googlebot 2026-09-23 23:05:22
Santa Marta 2026-09-23 23:50:22
YandexBot 2026-09-23 23:59:39
Bingbot 2026-09-24 00:23:06
Ashburn 2026-09-24 00:23:27
Montreal 2026-09-24 00:49:45
Columbus 2026-09-24 01:02:28