SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2006
    0 Post(s)
    0 Thread(s)

    Question disable the user from submitting next post in 15 minutes time

    how to disable the user from submitting next post after they submit a post in 15 minutes time?

    hi, i wish to set the time where user can only post their reply after 15mins of their last post..

    shall i do it using session or is there any other way to do this???

    thank you!
    newbie...really need your guidance......

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Sydney, NSW, Australia
    25 Post(s)
    1 Thread(s)
    Sessions would work provided that they don't close and re-open their browser. As soon as they do that the session is gone and they can repost straight away.

    Slightly more difficult for them to get around is to capture their IP address and disallow posts from the same IP for the period. Chances of the IP address being reallocated to someone different who then tries to post within that time is probably unlikely.
    Stephen J Chapman, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Manchester UK
    158 Post(s)
    3 Thread(s)
    1/ set a session
    2/ set a cookie
    3/ log their IP and time

    do them all or just pick
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  4. #4
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    0 Post(s)
    0 Thread(s)
    How about a database oriented solution? We save the time of last post in the database, when for each new post, the time field of database is refreshed with the new time.

    Then, when user tries to do a post, we check the time of the last post from the database. Of course this will work only when user has a log in and password. On the other hand, it will work on computers where cookie is disabled, user can't just post by opening a new window, or by changing their IP address. You are restricting posts per user name. If you want to restrict posts per machine, then IP address might be the way to go.

    Having said that, I'll tell that I'll probably never do such a thing. Aim of any community site is to encourage users to be in the site longer, and do more posts, not the contrary. Disallowing user to post with an interval of 15 minutes can seriously discourage a lot of users to come back to the site. Personal opinion, of course.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts