the one for today returned an underscore in the name, not valid for domains. The one for tommorow wasn't so bad. But would recommend something like this:
#define MAX_LABEL_NAME 63
string DomainFlux()
{
string prefix[] =
{ "www.", "", "ftp.", "irc.", "foo.", "bar." };
char valid_chars[] =
"0123456789"
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"-";
string suffix[] =
{ ".com", ".net", ".org", ".info", ".etc" };
time_t timer; char temp[7];
// seed random with current day/year, drop the hours/mins/secs
time(&timer);
strftime(temp, 7, "%j%Y", localtime(&timer));
srand( atoi(temp) );
string name = prefix[rand() % (sizeof(prefix) / sizeof(string))];
for(int i = 0; i < (rand() % MAX_LABEL_NAME); i++)
name += valid_chars[rand() % sizeof(valid_chars)];
return name + suffix[rand() % (sizeof(suffix) / sizeof(string))];
}