fusiongrokker

Entries for month: January 2008

Possible Domain Name Fraud?

Last week I read a blog post by Mike Brunt, a colleague of mine. In it, he expresses his concern over the potential for Domain Registrars to watch for commonly searched domain names, and to buy, or in his case, "hold" them — something he thinks may have happened to him.

This raises a very good point: That the registrar has a vested interest to capture searches and to keep tabs on which names are being commonly searched, potentially meaning they are worth more money.

Before now, I would always search for available domains at my registrar of choice (Active-Domain), and I have to say that although I search infrequently, and buy even less frequently, I've never had a problem or suspected them of acting unethically. Even so, I think I will start running any name searches through an independent site with no vested interest in what I'm searching for, like GeekTools.

Posted in Meta January 29 2008

Stealing Functionality From PHP: include_once()

Chances are that if you're a ColdFusion developer, you've at least looked at some PHP code every now and then. Even if just to see how much better our language of choice is than theirs. ;)

Something that I always thought was cleverly done in PHP was include_once(). If you're not familiar with it, basically it's the same thing as <cfinclude>, except that if the requested file has already been included for the current request, the command is ignored. I've written a custom tag that will accomplish the same thing for you. Click through for the code!

[viewcode] src="includeOnce.cfm.txt" showsyntax=no link=yes geshi=cfm[/viewcode]

Using listContainsNoCase() means that you can include templates using either Upper Case or lower case for the template name (on Windows) and unlike PHP, it will still only be included once. Note that on Linux file names are case sensitive, so this doesn't apply. If you use Linux and (cringe) files with the same name but different case, then you'll want to remove the NoCase part.

Posted in ColdFusion January 23 2008

Update to my cf_rewrite code

Today J.J. Merrick linked to my cf_rewrite post, which reminded me that I had improved the code but never posted it. I've updated the original post with some new code and updated the demo to reflect the change. View the original post here.

Posted in ColdFusion January 02 2008