PHP 自动化Snipplr spambot保护
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP 自动化Snipplr spambot保护相关的知识,希望对你有一定的参考价值。
<?
$q = "What does seven * eight equal?";
$word_numbers = array("one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen");
$numbers = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);
$q = str_ireplace($word_numbers, $numbers, $q);
$word_signs = array("plus", "minus", "times", "x", "divided");
$signs = array("+", "-", "*", "*", "/");
$q = str_ireplace($word_signs, $signs, $q);
preg_match("!(\d{1,3}) ([^~]*?) (\d{1,3})!", $q, $out);
$first_number = $out[1];
$second_number = $out[3];
switch($out[2]) {
case '+' :
$answer = $first_number+$second_number;
break;
case '-' :
$answer = $first_number-$second_number;
break;
case '*' :
$answer = $first_number*$second_number;
break;
case '/' :
$answer = $first_number/$second_number;
break;
default :
$answer = "Failed";
break;
}
echo $answer;
?>
以上是关于PHP 自动化Snipplr spambot保护的主要内容,如果未能解决你的问题,请参考以下文章
html 隐藏电子邮件地址从 - spambots.html
sh 来自http://snipplr.com/view.php?codeview&id=55151
sh 来自http://snipplr.com/view.php?codeview&id=55151
apache_conf Block Spambot wie darodar und semalt
Snipplr的Wordpress插件
Snipplr API ruby库