I am developing a website were I will have pages with videos on them.
I will have a feature where the website will continuously play through random videos(load random pages after videos finish playing). I want to make sure that the user doesn’t get the same videos over and over with the random feature.
So I would like to save the users page history somehow.
Can anyone point me into the right direction on how to implement something like this?
EDIT
I wont be having user registration on this website.
you can save the views in the database with a table in the sort of:
user_views (user_id, video_id, last_viewed)
now you need to select a random record from the videos table where the id is not in (SELECT
video_idFROMuser_viewsWHEREuser_id= _USER_ID_ AND last_viewed > X)X would be the minimal past time for re-viewing the video in the random videos list
hope this helps