I've only just started working on this large existing code base, so admittedly, maybe there's something I'm missing about this, but something tells me this may be a bit excessive.
/* Generate a _very_ random number */
$unique_id = md5((md5(rand(0,100000))*rand(0,100000)));