The way we did was modifying wwwacct to create a new file with the domain information and put it in the newly created home directory, then using an index.php we use the following.
}
$FILEPATH = &FILENAME&;
$FILE = fopen($FILEPATH, &r&

;
$a = fgets($FILE, 300);
$b = fgets($FILE, 300);
$c = fgets($FILE, 300);
fclose($FILE);
Where $a=domain $b=IP and $c=username