Archive for August 26th, 2007

Converting seconds to minutes and seconds

Sunday, August 26th, 2007

Some time ago I was in IRC and someone asked how to convert x amount of seconds into seconds and minutes. This is somewhat of an easy task and here is a simple function which can do exactly that (please note no effort was made so it would work with anything more than an hour):-

function sec_to_min($sec='')
{
if (ctype_digit((string)$sec))
{
$seconds = $sec % 60;
$minutes = ($sec-$seconds)/60;
$min_sec = $minutes.':'.str_pad($seconds, 2, '0', STR_PAD_LEFT);
return $min_sec;
}
else
{
return '0:00';
}
}

Ways in which this could be enhanced:-

  1. Make it more aware of whether any minutes exist.
  2. Enhance it so that it can also work with hours, days etc.

Is Domain Tasting Wrong

Sunday, August 26th, 2007

I have decided to cover domain tasting as my first post. It is a subject I feel very strongly about and would like to tell you why.

So what is domain tasting. Domain tasting is the practice of registering domain names and parking them, if they do not achieve $x amount of revenue within the first 5 days the domain is dropped and returned to the registry. For domain tasters to make a profit they have to make roughly $0.10 in the first five days on the domain name (going on a domain price of $6.95 per domain). If the domain does not make this money then the domain tasterswill drop the domain name and return it to the registry. The domain tasters either have an agreement with the registrar to ensure that they do not incur any fees or they use a registrar that will allow you to drop a domain without any questions (a registrar is not charged for a domain that has been dropped within the first 5 days).
(more…)