How can I allow guests and registered users but stop spammers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • entertainmentliveuk
    New Member
    • Aug 2007
    • 9

    How can I allow guests and registered users but stop spammers

    My web site (REMOVED) has an add gig page which allows users to add gigs to their profile and to the gig guide, however I am getting around 30 spoof gigs a day using the form. I have inserted a random code input in to the form for guests to fill out before enabling the submit button. However, someone has found a way around this and I am wondering if there is anyone out there who might have a suggestion on how to trap them.

    The page http://REMOVED/include_bands/add_gig.php
    Current security for guests:
    10 randomly generated alphanumeric letters to activate submit.
    A trap to see if the guest adds the code URL=http:// in to the description field

    Suggestions welcome
    Last edited by ak1dnar; Aug 25 '07, 08:05 AM. Reason: Web Site Advertising is considerd as Spamming
  • nathj
    Recognized Expert Contributor
    • May 2007
    • 937

    #2
    Originally posted by entertainmentli veuk
    My web site (REMOVED) has an add gig page which allows users to add gigs to their profile and to the gig guide, however I am getting around 30 spoof gigs a day using the form. I have inserted a random code input in to the form for guests to fill out before enabling the submit button. However, someone has found a way around this and I am wondering if there is anyone out there who might have a suggestion on how to trap them.

    The page http://REMOVED/include_bands/add_gig.php
    Current security for guests:
    10 randomly generated alphanumeric letters to activate submit.
    A trap to see if the guest adds the code URL=http:// in to the description field

    Suggestions welcome
    Hi,
    You could try Captcha Security image

    Using this in combination with some Java Script you could only enable the subit button when it is valid.

    Alternatively you could have a hidden field on the form that a bot would fill in but a user wouldn't. If this is filled in you could simply not add the records to the database.

    There's a couple of suggestions for you.

    I've implemented the captcha I mention and it works fine for me.

    Cheers
    nathj

    Comment

    • entertainmentliveuk
      New Member
      • Aug 2007
      • 9

      #3
      Originally posted by nathj
      Hi,
      You could try Captcha Security image

      Using this in combination with some Java Script you could only enable the subit button when it is valid.

      Alternatively you could have a hidden field on the form that a bot would fill in but a user wouldn't. If this is filled in you could simply not add the records to the database.

      There's a couple of suggestions for you.

      I've implemented the captcha I mention and it works fine for me.

      Cheers
      nathj
      Thanks nathj,

      I invented my own Captcha code of 10 random letters and spaces to view, which is inserted automatically into a hidden field. When the user types in the correct code, without the spaces, using the correct case, it activates the submit button. See code below:
      [PHP]function add_check($name )
      {
      echo"<script>do cument.all.$nam e.disabled=true ;</script>";
      $letters_a=arra y("1"=>"a","2"= >"s","3"=>"f"," 3"=>"g","4"=>"h ","5"=>"j","6"= >"k", "7"=>"L","8"=>" m","9"=>"n","10 "=>"@");
      $letters_b=arra y("1"=>"6","2"= >"4","3"=>"5"," 3"=>"7","4"=>"4 ","5"=>"8","6"= >"9", "7"=>"2","8"=>" #","9"=>"5","10 "=>"42");
      $letters_c=arra y("1"=>"q","2"= >"w","3"=>"e"," 3"=>"r","4"=>"t ","5"=>"y","6"= >"u", "7"=>"%","8"=>" p","9"=>"Te","1 0"=>"rF");
      $letters_d=arra y("1"=>"3","2"= >"2","3"=>"5"," 3"=>"23","4"=>" 56","5"=>"5","6 "=>"7", "7"=>"4","8"=>" 6","9"=>"9","10 "=>"5");
      $letters_e=arra y("1"=>"z","2"= >"x","3"=>"c"," 3"=>"v","4"=>"b ","5"=>"n","6"= >"m", "7"=>"bg","8"=> "c","9"=>"x","1 0"=>"?");
      $letters_f=arra y("1"=>"£","2"= >"&","3"=>"S"," 3"=>"R","4"=>"T ","5"=>"H","6"= >"Y", "7"=>"M","8"=>" S","9"=>"Z","10 "=>"H");
      $letters_g=arra y("1"=>"L","2"= >"Y","3"=>"h"," 3"=>"e","4"=>"b ","5"=>"s","6"= >"h", "7"=>"r","8"=>" s","9"=>"g","10 "=>"f");
      $letters_h=arra y("1"=>"T","2"= >"z","3"=>"Z"," 3"=>"$","4"=>"# ","5"=>"@","6"= >"?", "7"=>"b","8"=>" n","9"=>"m","10 "=>"b");
      $letters_i=arra y("1"=>"g","2"= >"H","3"=>"j"," 3"=>"K","4"=>"m ","5"=>"M","6"= >"b", "7"=>"B","8"=>" V","9"=>"E","10 "=>"W");
      $letters_j=arra y("1"=>"6","2"= >"4","3"=>"5"," 3"=>"7","4"=>"4 ","5"=>"8","6"= >"9", "7"=>"2","8"=>" =","9"=>"5","10 "=>"42");
      $letter_a=$lett ers_a[rand(1,10)];

      $letter_b=$lett ers_b[rand(1,10)];
      $letter_c=$lett ers_c[rand(1,10)];
      $letter_d=$lett ers_d[rand(1,10)];
      $letter_e=$lett ers_e[rand(1,10)];
      $letter_f=$lett ers_f[rand(1,10)];
      $letter_g=$lett ers_g[rand(1,10)];
      $letter_h=$lett ers_h[rand(1,10)];
      $letter_i=$lett ers_i[rand(1,10)];
      $letter_j=$lett ers_j[rand(1,10)];
      $theword=$lette r_a."".$letter_ b."".$letter_c. "".$letter_d."" .$letter_e."".$ letter_f." ".$letter_g."". $letter_h."".$l etter_i."".$let ter_j;
      $display_wrod=$ letter_a." <b>".$letter_b. "</b>&nbsp;&nbsp;& nbsp;&nbsp;<i>" .$letter_c."</i> ".$letter_d."&n bsp;&nbsp;&nbsp ;&nbsp;".$lette r_e." ".$letter_f."&n bsp;&nbsp;&nbsp ;&nbsp;<b>".$le tter_g."</b> ".$letter_h."&n bsp;&nbsp;&nbsp ;&nbsp;".$lette r_i." <s>".$letter_j. "</s>";
      if($theword=="" ){$theword="Dog Fish";}
      echo "please key in the following code in to the box below to send your message.<p><cen ter>";

      echo "<div name=\"$name"." jhvb\" id=\"$name"."jh vb\" style='width:30 0px;color:FF000 0;background:#F F4444 url(../siteimages/pw_bg.jpg);font-size:15pt;font-family:times;cu rsor:default;' onmouseup=\"doc ument.all.$name "."jhvb.style.d isplay='none';\ " onSelect=\"docu ment.all.$name" ."jhvb.style.di splay='none';\" >$display_wro d</div>
      <input name='$name"."c heck' type='hidden' value='$theword '>
      <input name='$name"."t est' id='$name"."tes t' type='text' value='' onkeyup=\"if(do cument.all.$nam e"."test.value= =document.all.$ name"."check.va lue) {document.all.$ name.disabled=f alse;}else{docu ment.all.$name. disabled=true;} \">
      ";
      }
      [/PHP]
      called with
      [HTML]Then <input type="button" value="Click here" onclick="docume nt.gig.submit() ;" id='subButton'> to e-mail me these details
      <?php if(!isset($_SES SION['username'])) {add_check('sub Button');echo"</center>";} ?></div>[/HTML]
      People still manage to circumnavigate the check!

      Comment

      • ak1dnar
        Recognized Expert Top Contributor
        • Jan 2007
        • 1584

        #4
        Originally posted by entertainmentli veuk
        My web site (REMOVED) has an add gig page which allows users to add gigs to their profile and to the gig guide, however I am getting around 30 spoof gigs a day using the form. I have inserted a random code input in to the form for guests to fill out before enabling the submit button. However, someone has found a way around this and I am wondering if there is anyone out there who might have a suggestion on how to trap them.

        The page http://REMOVED/include_bands/add_gig.php
        Current security for guests:
        10 randomly generated alphanumeric letters to activate submit.
        A trap to see if the guest adds the code URL=http:// in to the description field

        Suggestions welcome
        Please Post the not working code Snippets. Do not post the Real world links to the Forum.
        Thanks!

        Comment

        • pbmods
          Recognized Expert Expert
          • Apr 2007
          • 5821

          #5
          Heya, entertainmentli veuk.

          The point behind Captcha is to present the validation code in such a way that it cannot be 'guessed' by a spam program. Hence the funny-looking image with the weird, colorful letters and numbers at odd angles with fuzz all over them.

          That's a technical description.

          Have a look at re-Captcha, a much more eco-friendly variation of Captcha. It's free, and you can integrate it into your site's functionality quite painlessly.

          Comment

          Working...