Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 932851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:44:07+00:00 2026-05-15T20:44:07+00:00

This article about php form security: http://nedbatchelder.com/text/stopbots.html … mentions a spinner as: The spinner

  • 0

This article about php form security:

http://nedbatchelder.com/text/stopbots.html

… mentions a “spinner” as:

The spinner is a hidden field used for
a few things: it hashes together a
number of values that prevent
tampering and replays, and is used to
obscure field names. The spinner is an
MD5 hash of:

* The timestamp,
* The client's IP address,
* The entry id of the blog entry being commented on, and
* A secret.

The field names on the form are all
randomized. They are hashes of the
real field name, the spinner, and a
secret. The spinner gets a fixed field
name, but all other fields on the
form, including the submission
buttons, use hashed field names.

Does anyone have a code sample of how to implement this on a php page containing a form and the associated php form submission script?

I don’t want to use AJAX, just PHP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:44:08+00:00Added an answer on May 15, 2026 at 8:44 pm

    You could implement the following:

      On Page Submit:
      <?php
        $spinnerKey = 'spin';
        $spinner = $_POST[$spinnerKey];
        $values = array();
    
        foreach ($_POST as $key=>$value)
        {
          if ($key !== $spinnerKey)
          {
            $values[deHash($key, $spinner)] = $value;
          }
        }
    ?>
    
    A 'deHash' example:
    <?php
    
        # You have to define deHash based on your hash but it 
        # would look something like this:
        var $_rainbowTable = array();
        var $_expectedKeys = array();
    
        function deHash($hashedkey, $spinner)
        {
            $rt = $this->getRainbowTable($spinner);
    
            return isset($rt[$hashedKey])
              ? $rt[$hashedKey])
              : NULL;
        }
    
        function getRainbowTable($spinner)
        { 
            if (count($this->_rainbowTable) > 0)
                return $this->_rainbowTable;
    
            foreach ($this->_expectedKeys as $key)
            {
                $this->_rainbowTable[hash($key, $spinner)] == $key;
            }
    
            return $this->_rainbowTable;
        }
      ?>
    

    Ultimately though I don’t see how this stops bots submitting your page – it just stops people’s “email/user/pass” remember browser plugin from working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

LearnWPF.com posted this article about converting bitmap images to XAML and using them in
I have this little function function makewindows(){ child1 = window.open (about:blank); child1.document.write(<?php echo htmlspecialchars(json_encode($row2['ARTICLE_DESC']),
There are lots of PHP articles about the subject so is this a PHP
I was reading this article about Double-Checked locking and out of the main topic
I happened across this article about hardware based hard drive encryption and realized that
When I saw this article about using a python-like sintax (indentation based, without curly
I don't understand where the extra bits are coming from in this article about
Recently I ran across a blog article about using PHP scripts to redirect affiliate
I just read an interesting article about php hanging on certain float numbers, see
I've been reading up a bit on how multi-tiered commenting systems are built: http://articles.sitepoint.com/article/hierarchical-data-database/2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.