Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Security Token?

  1. #1
    Regular Coder kokjj87's Avatar
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    279
    Thanks
    1
    Thanked 55 Times in 54 Posts

    Security Token?

    Hi, i am trying to come up with a security token system for all my form, normal approach would be setting a token and put it in to the session whenerever the user request a new page.

    $_SESSION['token'] = random string here.

    The problem is, the string would be overwritten everytime when a user request a new page.
    But it is common now for people to open up a few tab for a website.
    And it would cause the token to expire, and cause the last few tabs you open to fail the security token check.

    Is there a better soultion?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    What type of form do you have? Is it a contact form? And are you just trying to prevent spam? I suggest you read this article if its a contact form.

    http://www.phpbuilder.com/columns/ia...n20060412.php3
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    oesxyl (12-10-2008)

  • #3
    Regular Coder kokjj87's Avatar
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    279
    Thanks
    1
    Thanked 55 Times in 54 Posts
    Actually it is more of preventing spam, more like forcing the user to use my form to submit the data.


  •  

    Posting Permissions

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