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 (Completely Automated Public Turing test powiedzieć Komputery i Humans Apart) jest zdecydowanie jednym z najlepszych sposobów, aby znokautować większość spamu pojawia. Its become popular with web 2.0 applications. Jego stały się popularne aplikacje z web 2.0. So much that its become widely used and thus spammers found a needed to crack it. Tyle, że staną się powszechnie używane, a więc spamerzy znaleźli potrzebne do złamania go. 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. Jeśli możesz utworzyć nową i unikatową CAPTCHA jednak, będziesz o wiele bezpieczniejsze a następnie wszyscy, którzy mają tendencję do używania tego samego skryptu po stronie witryny.

About a year ago I tried a simple addition script. Około rok temu próbowałem prosty skrypt, dodatkowo. If you didn’t enter the right result of the simple query it would error. Jeżeli nie udało Ci się wprowadzić prawo wyniku prostej kwerendy to błąd. This actually works pretty well for me and most others right now. Ten faktycznie działa całkiem dobrze dla mnie i większości innych right now. Especially since they have evolved into changing the numbers used in the addition after each refresh. Zwłaszcza że mają one ewoluowały do zmieniających numery wykorzystywane w dodatku po każdym odświeżyć. When I use something like this I get even less spam slipping through. Kiedy mogę używać coś takiego mogę dostać jeszcze mniej spamu poprzez poślizgu. So I took the addition script a step further. Wziąłem więc Dodatkowo skrypt o krok dalej. Why? Dlaczego? 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. Ponieważ jednym numerem można łatwo skopiowane przez skrypt, a ponieważ nie wszystkie serwery mam mieć pracował z ImageMagik i / lub GD Library zainstalowany.

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. W około 15 linii I wyruszyli z funkcji, które generowane dynamicznie dwóch liczb i pozwala na tablicy różnych znaków / tekst / symbole powiedzieć użytkownikom odpowiednie zastosowanie matematyki w różnych sposobów. Just add more to make it a bit more complex for spammers. Wystarczy dodać więcej, aby uczynić ją nieco bardziej skomplikowane dla spamerów. You can also mix it up by inserting random characters between words: “Plus” or “PLUS” or “P L U S”. Można także zmieszać go poprzez dodanie losowych znaków między słowami: "Plus" lub "PLUS" lub "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. Nic nie jest bezpieczny, może to być zbyt krakingu. 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. Ale pozwoli Ci się typowy bot lub "scenariusz dzieciak", że chce spam witryny i powodować więcej o ból głowy dla profesjonalistów chce się zajmować. When this gets beaten and spammers have automated their way around my method then I have another plan in mind. Gdy ten zostanie pobity i spamerzy mają zautomatyzowany sposób ich wokół mojej metody następnie Mam na myśli inny plan. Thats another day however. Thats jednak innego dnia.

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. Do tej pory Znalazłem klucz do uniknięcia spamu jest do pobytu z dala od typowych CMS i / lub sądu systemy, które zawierają kod wśród wielu innych cookie cutter witryn. This defiantly isn’ta solution for most of you. Ten defiantly listy dialogowej rozwiązaniem dla większości z Was. 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. Ale jeśli wykonania tego kodu lub coś podobnego to w miejscach, że sprawa ... ... coś unikalny można złamać przez spamerów skryptów prowadzenie witryny z typowych oczekiwań spamera.

Also, a friend mentioned the addition/subtraction might be too hard for users and you’ll have lost comments/email. Także wymienionych znajomemu dodawania / odejmowania może być zbyt trudna dla użytkowników i będziesz musiał stracił komentarzy / e-mail. Maybe you’re considering that too? Może bierzesz pod uwagę, że zbyt? 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. Mam pytanie do jakości pozostawiając użytkownikowi, że jest Ci komentarz lub wysyłając e-mail, jeśli nie może dodać lub odjąć pojedyncze cyfry numerów. Though you could increase the difficulty by adjusting the randomization seed and throw in some long division. Chociaż można zwiększyć poprzez dostosowanie trudności w randomizacji nasion i rzucać w niektórych długo podziału. That might be overkill :). Które mogą być 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 . Jeśli trzymania się z serii spam można zapoznać się z mojego ostatniego postu: 5 Ways To Catch i zapobiegania Witryna Forma Spam - część 1. I updated the second block of code on that page to check the referring URL to prevent form abuse. I aktualizacja drugi blok kodu na tej stronie, aby sprawdzić adres URL odnoszący się do formy zapobiegania nadużyciom.



Leave A Comment: Zostaw komentarz:

Comments RSS Feed Kanał RSS komentarzy

5 Plus 1 = 5 plus 1 =

Custom Theme by Rob Malon | Content & Design © 2008 - Rob Malon [dot] Com. Custom Theme przez Rob Malon | Content & Design © 2008 - Rob Malon [dot] com. "));
"));