php - Using expiring Cookies to allow certain time limted features to users on a web application -
i creating web application allows user post article/blog on application. want allow users edit blog uptil limited time of creating blog. 15-20 minutes.
to provide feature thinking of taking of cookies. whenever new blog created, create expiring cookie on user's computer. whenever user tries edit blog, corresponding cookie must present , sent server, if no cookie present/expired no edit allowed!
is way implement functionality? there better alternatives ?
i not want make read database see time blog created , allow him edit or not.(my db not read optimized, write optimized) know if cookies disabled functionality not implemented user or if user changed computer in between, can safely assume can live limitations. comments, feedback, criticism welcomed!
cookies expirations can manipulated easily. need store data on server side in session (persisted either file, memcache, or database), or can use data attached blog post.
your claim database engine not read optimized hogwash. if it's not custom written, assure can handle query check when row created (provided stored).
Comments
Post a Comment