Dhiraagu e-Directory data for download (2008-10-06)

Here is the data from Dhiraagu e-Directory that I had mentioned in my previous post "Phone usage (Maumoon, Political Parties, Government and Businesses)". The data was acquired yesterday and contains all of 338,371 entries (made up of 305,198 mobile numbers, 24423 landline numbers and 8750 island/resort numbers) that was listed on the e-Directory service. It is interesting to note that the total entries now is 114,018 more than the March 2007 data I published earlier. This increase comes from an almost doubling of mobile numbers registered (the March 2007 showed 194,025 mobile numbers)!

Anyway, here's the data. As before, it's presented as a Tab-Separated Values (a.k.a CSV) format file racking up 16.8MB uncompressed. I've Zipped down the file to 5.1MB for easier downloading. The file can be opened in Excel, OpenOffice or imported into Access or any other database.

- Download edirectory-2008-10-06.zip

Enjoy!

Thaana date formatting for PHP 5

Here is a PHP 5 class that provides a drop-in function replacement/equivalent for the built-in PHP date() function to output formatted dates in Thaana/Dhivehi. It follows the standard method of writing Gregorian dates in Thaana by using transliterations of the English month names and using the native Dhivehi names for the week days. It accepts all the usual formatting arguments permitted by the original date() function thus allowing the same degree of formatting freedom as the original. The output returned from the function uses ASCII Thaana and, if needed, can then be converted to Unicode/UTF-8 by using the Thaana Conversions class. This class does not support Hijri dates (yet).

The class is being released under the Open Source MIT License.

Functions exposed

format()
Returns a Dhivehi date string formatted according to the given format string using the given integer timestamp

Usage

<?php
// Load class include
require 'thaana_date.obj.php';

// Format date
$thaanatoday = Thaana_Date::format('j M Y', time());
?>

Download

- Thaana_Date.zip (v0.2, 1.4KB)

Drop me a line if you have comments/queries. Enjoy :-)

Thaana Unicode<->Ascii conversions PHP class

Here is something that would probably be very handy to Maldivian web developers dabbling with Dhivehi sites. This PHP class addresses the need for converting text to and from Thaana in Ascii and Thaana in Unicode.

The class makes it easy to standardize text into one format irrespective of how it was/is written. This means that you can take text written in Accent, MS Word 97 (and prior) or written using Unicode as featured on recent MS Word editions and use the class to present output in the format of your choice without the need for imposing restrictions on the people who write the text. The class comes in even more handy when you have a form submission that takes input in Unicode but needs to be stored in the database or presented later as Ascii, or vice versa.

The class was something I originally wrote around 2001 and was used in the free Online Document Converter that featured on maldivianunderground.net. I rewrote it for PHP 5 recently for use in a project I am working on. The original class had support for Letin dhivehi -> Unicode/Ascii conversions as well which I haven't included in this release but will add it a future update.

Usage should be pretty straightforward but here is an example just to illustrate:

Example:
<?php
require 'thaana_conversions.obj.php';
$thaana = new Thaana_Conversions();

echo $thaana->convertUnicodeToAscii('&#1931;&#1960;&#1928;&#1964;&#1920;&#1960;');
echo $thaana->convertAsciiToUnicode('rWacje');
?>

Download:
- Thaana_Conversions.zip (v0.1, 2KB)

Enjoy :-)

Update (7-May-2008): This version is now superseded by v0.2.

Updated: PHP script for Hulhule flight info

I'm releasing an update to the Hulhule FlightInfo PHP class I released late last year as a response to a feature request I received recently. The update adds support for flight information for all the days as available on the Flight Information Services site rather than the current-day-only mode that the original script supported. A small demo script is packaged in the download to highlight the usage details.

The Hulhule Flight Info class simplifies access to the flight information by doing the dirty work of grabbing the HTML page from the FIS site, parsing it, extracting the required information and making it accessible as a multidimensional array. It supports grabbing both the arrival and departure information and is easy to use. It has since been integrated into a few sites by different people.

- Download the flightinfo class v0.2

Enjoy :-)

Possessed by demons: A true story

Since I wrote about Jinns in my last post, I thought I'd follow up with this...

While at the Centre For Higher Secondary Education (Male', Maldives), I heard of this student who supposedly had been possessed by a jinn/demon and had to spend three months away from school. The school newspaper (called "CentrEye"), for which I was the editor then, immediately took an interest in getting his experiences published (we knew it would be a bit hit - our front page story!). He narrated everything in detail, right from the time that the demon Jinn started harassing him, how the demon eventually took possession of his body and the experiences that he was subjected to and how he came out of it all.

I had listened intently as he recalled the events and we shot questions to clear up this and that. The guy was very sincere in his belief in the events that had happened and had a pretty coherent story to tell. He was in almost all respects the normal sort of guy - friendly, kind and very entertaining. I was very much intrigued by the tale, especially since I was then pretty much accepting of the possibility of the existence of these so-called "supernatural beings"...

His experiences were published in 3 instalments, beginning with the Feb 2001 issue of the paper. Credits go to the original writers - the first instalment was written by Afu but the rest were written by the possessed himself. Here is the first 2 with the original text and has been converted to a PDF with some formatting applied for looks. I can't find the 3rd part but will put up when/if I find it...

- Possessed by Demons: A true story (Part 1)
- Possessed by Demons: A true story (Part 2)

Maldives Post Code data for download

The Maldives Post Ltd introduced 5 digit Post Codes back in 2002. The houses in Male' and Villingili have their own post code available unlike the rest of Maldives which, for now, have generic codes handed out for each island/atoll including resorts and Hulhule'/Hulhumale'.

I thought I'd publish the data for Male' and Villingili, in tab-separated-values format, in case anyone has a need for them. The data files can be opened with any software that supports delimited text files (eg. MS Excel). The data is extracted from the Post Code Finder service on the Maldives Post website.

- Download the zipped files (55 KB)

Dhiraagu Directory data for download

It's been a while since I updated my copy of the Dhiraagu Telephone Directory data via their e-Directory service but I finally got around to doing it today since my copy was at least half a year old. So after a few minutes of programming and few hours of automatic and courteous (translated: painfully slow) spidering, I had a fresh copy of the Directory which bears 224,353 number entries. That is definitely an astounding achievement for Dhiraagu considering Maldives has a population of around 300,000 and they seem to have achieved selling their service to almost all of them! What more, 194,025 of these are mobile numbers (postpaid and prepaid included).

Anyway, here's the data for ya all. It's a Tab-Separated Values file sized 11.4 MB which I've Zipped down to 3.4 MB for easier downloading. The file can be opened in Excel, OpenOffice or imported into Access or any other database.

- Download edirectory-2007-03-09.zip

Enjoy!