Compile your apache with mod unique_id and let the web server care about it for you.
On high traffic servers the performance impact is almost nothing. Your solution is considerably slower than apache inique_id and will consume quite more CPU.
Other than that, it's an ok solution.
|