My impression was that the "home/domain/etc." part referred to the physical path on the server, so you have to start from /machoRand. (Is that really the name of the function? :))
Backtracking a little bit: If I've understood it right, the code starts executing in response to user action. But at that point it pulls up something at random; the user isn't asking for one of those 100,000 URLs by name. If so, it seems like the random numbers could perfectly well be generated ahead of time, when the page is built, and kept in some type of holding bin. The user doesn't know, and doesn't need to know, that the numbers were really generated several seconds before he clicked. Store some reasonable number of them-- ten or a hundred or whatever is appropriate to the page-- and refresh the page if you run out.