SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Sep 2011
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Posting Comments (Security)

    Hi, how do Facebook posts (status updates) / comments work in terms of security...

    I was surprised to see that Facebook allowed me to post 3 status updates one after the other and then also allow me to post 20 comments on a status update all within 5 seconds

    I have a comment feature on my website and i need a way of preventing users from spamming with comments (without use a captcha)

    Users must be logged in to post a comment... so when a comments is being posted, should i just check to see if the same $ user_id posted a comment within the last 20 seconds... or can someone think of a more suitable method...

    Thanks in advance for your help...

  2. #2
    SitePoint Member aurobindosahoo's Avatar
    Join Date
    Nov 2012
    Location
    India
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can develop your code as to give restriction to not post same users post within 1 hour or more?

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2011
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, youd have a file, script or class to handle posting comments. In there, set a session variable with the timestamp of the last comment.
    Check the timestamp when posting new comments, control how much time has passed, if not enough time has passed, refuse to post the comment.

    Should get you started.


Bookmarks

Posting Permissions

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