Choosing a Domain Registrar

January 2nd 2008

At one point between work and personal sites, I managed close to 10 different domain names. A couple years ago I decided it was time move all of the domain names I manage to one account to make my life easier.

Two of the domains I had registered before this time were with Namesecure, and it quickly became apparent that choosing them was a mistake.

One domain was transferred without problems, but getting the other domain transferred took nearly a year. Through the process of getting this domain transferred, I learned two very important lessons.

Never do business with a company that doesn’t provide phone support

When I originally registered my domain names I didn’t care that Namesecure didn’t have phone support because I figured I could take care of most things myself, and e-mail is easier to deal with anyways.

But when a problem came along, I learned the value of phone support. Had I been able to call at the first sign of a problem and speak with someone in a support department it would have probably been resolved within a week or so.

Make sure the registrar offers all of the services you want

Is it important to you to be able to manage your DNS entries yourself? Do you need e-mail forwarding? Will you need to change/add subdomains on a frequent basis or on a whim?

Make sure the company you choose will allow you to do what you need to do! Had I originally chosen a company that provided all of the features I now want to use I wouldn’t have had to transfer my domains in the first place.

My recommendation

I highly recommend Domainsite as a registrar. They give you complete access to your domain name and DNS entries though their website that works well and is easy to use. They also have very good prices for domain name registration.

When you have a problem or question, they have great support. Domainsite has their mailing address, phone number, and support e-mail address right on the top of every page on their website.

Just a note: I am not an employee of Domainsite, just a satisfied customer.

Posted by bradym under Misc | No Comments »

Creating iCalendar (ics) files with PHP

January 2nd 2008

For a past project, I needed to create iCalendar files from event data stored in a database. There is an iCalendar class on phpclasses.org, but there is very little documentation and you need to understand some of the quirks of the iCalendar specification for it to be useful.

Since I got stumped on trying to get the class working, I went to the specs and figured out how to do it without using the class. Here are some links that I found helpful:

An iCalendar file is just a text file, so creating it is not difficult - it’s figuring out the quirks of the specification and understanding what the different properties mean that is frustrating. Of course the other frustrating thing is that there seem to be differences in how calendar applications parse ics files, and which fields they consider to be required.

Here’s the MySQL Table Schema that I’m using for my calendar table:

CREATE TABLE calendar
(
     id INT(11) NOT NULL AUTO_INCREMENT,
     title TINYTEXT,
     description TEXT,
     startDate DATE NOT NULL DEFAULT '0000-00-00',
     endDate DATE NOT NULL DEFAULT '0000-00-00',
     PRIMARY KEY (id)
)

And here’s the PHP that I used. Note that this code currently does not export ics files that can be used by Mozilla Sunbird. It works with MS Outlook 2003, which is my current target client.

// database connection
include_once('db.php');
// Dates must be in the format YYYYMMDD
$events = $conn->execute("SELECT id, title, DATE_FORMAT(startDate,'%Y%m%d') AS start, DATE_FORMAT(DATE_ADD(endDate, INTERVAL 1 DAY),'%Y%m%d') AS end, startDate, endDate, description FROM calendar");
// Define the file as an iCalendar file
header("Content-Type: text/Calendar");
// Give the file a name and force download
header("Content-Disposition: inline; filename=calendar.ics");
// Header of ics file
echo "BEGIN:VCALENDAR\n";
echo "VERSION:2.0\n";
echo "PRODID:PHP\n";
echo "METHOD:REQUEST\n";
// Loop through database results and create an event for each item
while(!$events->EOF)
{
    echo "BEGIN:VEVENT\n";
    // The end date of an event is non-inclusive, so if the event is an all day event or one with no specific start and stop
    // times, the end date would be the next day.  This script is used with a calendar that does not deal with times, just dates,
    // so the time for all events is set to 000000.
    echo "DTSTART:".$events->fields[start]."T000000\n";
    echo "DTEND:".$events->fields['end']."T000000\n";
    // Only create Description field if there is a description
    if(isset($events->fields[description]) & $events->fields[description] != '')
    {
            echo "DESCRIPTION:";
            // Remove all linebreaks from description stored in database
            $description = str_replace(chr(13).chr(10),"  ", $events->fields[description]);
            echo $description."\n";
    }
    echo "SUMMARY:{$events->fields[title]}\n";
    echo "UID:{$events->fields[id]}\n";
    echo "SEQUENCE:0\n";
    echo "DTSTAMP:".date('Ymd').'T'.date('His')."\n";
    echo "END:VEVENT\n";
    $events->MoveNext();
}
echo "END:VCALENDAR\n";

Posted by bradym under PHP | 4 Comments »

New Blog

January 1st 2008

As you can see I’ve just setup WordPress to run my new blog. I’ll post more soon.

Posted by bradym under News | Comments Off

« Prev