Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since you know whatever bot (probably a crawler) is including additional parameters in the call, you can probably assume it is not a directed attack on your server, though it could be fishing for weaknesses in your mysql escaping (or similar attacks).</p> <p>A few things I'd focus on:</p> <p>1) POST the page content (instead of GET) to avoid random web links if your domain was previously owned by someone else.</p> <p>2) If the $_POST contains anything other than the fields you expect, ignore that entire post (browser will not send additional fields unless you specified them yourself or someone added them to the page with a greasemonkey script (or similar)). You can check this with something like: </p> <pre><code>$allowedParams = array('name', 'email', 'subject', 'etc'); foreach($_POST as $param=&gt;$val) { if(!in_array($param, $allowedParams)) { die(); } } </code></pre> <p>3) Check the referer and/or useragent for common bots and either deny the data or handle it differently. Not bulletproof, but handy.</p> <p>4) If this script is being called via Ajax, look into <a href="http://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/" rel="nofollow">Cross Origin Resource Sharing</a></p> <p>5) <a href="http://www.onlineaspect.com/2010/07/02/why-you-should-never-use-a-captcha/" rel="nofollow">Don't use a captcha</a> unless you really really really have to (you probably don't). If you do decide on a captcha, use something simple like a "Are you human? (type yes)" with a textbox for "yes". Not one of those crazy, read this mess captchas.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload