tracking outgoing links
Posted: Mon Jun 20, 2005 11:21 pm
Let's say I have a random link generator with 10 links. How do I make it so that the surfer is randomly given a link from the 10 links at each request, so that the surfer is never given a link he has already been to? (through use of cookies)
I thought about giving each surfer a unique array of links, and at each request a random url would be selected, then taken out of that array. But then I didn't know how to incorporate this with cookies. (i'd probably have to use the mysql database, which would make it slower for the surfer)
Now I was thinking about giving the new surfer a number, like 0000000000
with each 0 representing a position in an array of links. At each request
a random position would be selected, then the corresponding array would be something like 0100000000 (1 for the location in spot #2 of the array of links that has already been visited.)
Anyone have a better idea?
I thought about giving each surfer a unique array of links, and at each request a random url would be selected, then taken out of that array. But then I didn't know how to incorporate this with cookies. (i'd probably have to use the mysql database, which would make it slower for the surfer)
Now I was thinking about giving the new surfer a number, like 0000000000
with each 0 representing a position in an array of links. At each request
a random position would be selected, then the corresponding array would be something like 0100000000 (1 for the location in spot #2 of the array of links that has already been visited.)
Anyone have a better idea?