CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is arguably one of the best ways to knock out the majority of spam you receive. CAPTCHA (complet automat Public Turing test pentru a spune Calculatoare şi la om afară) poate este una din cele mai bune moduri de a adormi, majoritatea de spam pe care le primiţi. Its become popular with web 2.0 applications. Sale devin populare cu aplicatiile Web 2.0. So much that its become widely used and thus spammers found a needed to crack it. Atât de mult ca sa devin utilizate pe scară largă şi, astfel, scrisori nedorite a găsit o nevoie de a sparge-o. If you can create a new and unique CAPTCHA however, you’ll be a lot safer then everyone else who tend to use the same script site after site. Dacă puteţi crea un nou şi unic CAPTCHA cu toate acestea, veţi fi mult mai sigur, atunci oricine altcineva care tind să utilizeze acelaşi script-ul de la site-ul site-ului.

About a year ago I tried a simple addition script. Acum un an am încercat un simplu script de plus. If you didn’t enter the right result of the simple query it would error. Dacă nu ai introdus dreptul de rezultat de interogare simplă ar eroare. This actually works pretty well for me and most others right now. Acest fapt funcţionează destul de bine pentru mine şi de cele mai multe altele, chiar acum. Especially since they have evolved into changing the numbers used in the addition after each refresh. Mai ales de când acestea au evoluat în schimbare de numere utilizate în plus, după fiecare refresh. When I use something like this I get even less spam slipping through. Când am folosi ceva de genul asta am chiar mai puţin de spam prin alunecarea. So I took the addition script a step further. Aşa că am luat script-ul de lângă un pas mai departe. Why? De ce? Because a single number can easily be copied over by a script and because not all servers I’ve worked with have ImageMagik and/or GD Library installed. Pentru că un singur număr pot fi uşor copiate de un script şi pentru că nu toate serverele Am lucrat cu ImageMagik au şi / sau de HG Biblioteca de instalat.

In about 15 lines I came up with a function that dynamically generated two numbers and allows an array of different signs/text/symbols to tell your users the appropriate math to apply in several different ways. La aproximativ 15 de linii am venit cu o funcţie care generate dinamic două numere şi permite o gamă de diferite semne / text / simboluri să-i utilizatori de matematica este cazul să se aplice în mai multe moduri diferite. Just add more to make it a bit more complex for spammers. Doar adăugaţi mai multe pentru a face un pic mai complexe pentru scrisori nedorite. You can also mix it up by inserting random characters between words: “Plus” or “PLUS” or “P L U S”. Puteţi, de asemenea, mix-o prin inserarea de caractere aleatoare dintre cuvinte: "Plus" sau "PLUS" sau "P L U S".

  1. //USAGE: $answer = numbercaptcha();
  2. //****** Call this between <form></form>
  3. //****** $_POST will contain $_POST['number']
  4. //****** Check if $_POST['number'] is == to $answer
  5. //OPERATORS: Add additional $opperators to the array for more varriation
  6. function numbercaptcha ( ) {
  7. //Set first and second num rand(min,max)
  8. $firstnum = rand ( 5 , 8 ) ;
  9. $secondnum = rand ( 1 , 4 ) ;
  10. $coinflip = rand ( 1 , 2 ) % 2 ; //Picks a random equation type
  11. if ( $coinflip == 0 ) {
  12. $math = $firstnum $secondnum ;
  13. $operators = array ( " " , "Added To" , "Plus" ) ;
  14. $operatorschoice = rand ( 1 , 3 ) % 3 ;
  15. } else {
  16. $math = $firstnum - $secondnum ;
  17. $operators = array ( "-" , "Minus" ) ;
  18. $operatorschoice = rand ( 1 , 2 ) % 2 ;
  19. }
  20. echo $firstnum . " " . $operators [ $operatorschoice ] . " " . $secondnum . " = <input type= \" text \" name= \" number \" maxlength= \" 2 \" size= \" 5 \" >" ;
  21. return $math ;
  22. }

Nothing is foolproof, this can be cracked too. Nimic nu este foarte simplu de manevrat, acest lucru poate fi prea spart. But it will get you around the typical bot or “script kiddy” that wants to spam your site and cause more of a headache for the pros to want to deal with. Dar se va vor face în jurul tipic de robot sau "script de copilaş", care vrea să-spam site-ul dvs. şi mai mult din cauza o durere de cap pentru argumente pro pentru a dori să trateze. When this gets beaten and spammers have automated their way around my method then I have another plan in mind. Când acest lucru se bătut şi scrisori nedorite au automate de drum în jurul meu metodă apoi am un alt plan în minte. Thats another day however. Asta cu toate acestea o altă zi.

For now, I’ve found the key to avoiding spam is to stay away from typical CMS and/or forum systems that contain predictable code among several other cookie cutter sites. Pentru moment, am găsit cheia pentru a evita spam este să stai departe de tipic CMS şi / sau de forum a sistemelor previzibile, care conţine codul de printre mai multe alte site-uri de cookie-ul de cuţit. This defiantly isn’ta solution for most of you. Acest defiantly isn'ta soluţie pentru cele mai multe de tine. But if you implement this code or something like it in the places that matter…something unique…you can break a spammers script by keeping your site out of the typical expectations of a spammer. Dar dacă ai pune în aplicare acest cod sau ceva de genul acesta în locurile care contează ... ceva unic ... te pot sparge un script de scrisori nedorite prin păstrarea site-ul dvs. ieşit din tipic de aşteptările de spam.

Also, a friend mentioned the addition/subtraction might be too hard for users and you’ll have lost comments/email. De asemenea, un prieten de menţionat plus / scădere ar putea fi prea greu pentru utilizatori şi veţi fi pierdut comentarii / e-mail. Maybe you’re considering that too? Poate tu a considera că sunteţi prea? I have to question the quality of user that is leaving you a comment or sending you an email if they can’t add or subtract single digit numbers. Am să pună în discuţie calitatea de utilizator lăsându-vă că este un comentariu sau să vă trimită un mesaj de poştă electronică, dacă acestea nu poate adăuga sau scădea singur sir de numere. Though you could increase the difficulty by adjusting the randomization seed and throw in some long division. Deşi aţi putea creşte de dificultate de adaptare a seminţe de randomizare şi arunca în unele lung divizare. That might be overkill :). Asta ar putea fi overkill:).

If you’re keeping up with the spam series you might want to check out my last post: 5 Ways To Catch And Prevent Website Form Spam - Part 1 . Dacă vă ţine pasul cu seria de spam s-ar putea să doriţi să verificaţi ultimul meu post: 5 moduri de a captura şi de a preveni spam Formular de Site Web - Partea 1. I updated the second block of code on that page to check the referring URL to prevent form abuse. Am actualizat cel de-al doilea bloc de cod de pe acea pagină pentru a verifica URL-ul referinţă pentru a preveni abuzul de formă.



Leave A Comment: Lăsaţi un comentariu:

Comments RSS Feed Comentarii RSS Feed

6 Added To 2 = 6 Adaugat Pentru a 2 =

Custom Theme by Rob Malon | Content & Design © 2008 - Rob Malon [dot] Com. Tema la comandă de către Rob Malon | Design & Content © 2008 - Rob Malon [punct] com. "));
"));