<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>请输入一个名称！ &#187; 帖子：自动删除非法字符的留言</title>
		<link>http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/topic/151</link>
		<description>请输入一个名称！ &raquo; 帖子：自动删除非法字符的留言</description>
		<language>zh-CN</language>
		<pubDate>Mon, 06 Feb 2012 02:13:33 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[搜索]]></title>
			<description><![CDATA[在这些版面中搜索全部帖子。]]></description>
			<name>q</name>
			<link>http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/search.php</link>
		</textInput>
		<atom:link href="http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/rss/topic/151" rel="self" type="application/rss+xml" />

		<item>
						<title>自动删除非法字符的留言</title>
			<link>http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/topic/151#post-227</link>
			<pubDate>日, 24 Jan 2010 06:14:00 +0000</pubDate>
			<dc:creator>匿名</dc:creator>
			<guid isPermaLink="false">227@http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/</guid>
			<description>&#60;pre&#62;&#60;code&#62;function in_comment_post_like($string, $array) {
	foreach($array as $ref) { if(strstr($string, $ref)) { return true; } }
	return false;
}
function drop_bad_comments() {
	if (!empty($_POST[&#38;#39;comment&#38;#39;])) {
		$post_comment_content = $_POST[&#38;#39;comment&#38;#39;];
		$lower_case_comment = strtolower($_POST[&#38;#39;comment&#38;#39;]);
		$bad_comment_content = array(
			&#38;#39;viagra&#38;#39;,
			&#38;#39;hydrocodone&#38;#39;,
			&#38;#39;hair loss&#38;#39;,
			&#38;#39;[url=http&#38;#39;,
			&#38;#39;[link=http&#38;#39;,
			&#38;#39;xanax&#38;#39;,
			&#38;#39;tramadol&#38;#39;,
			&#38;#39;russian girls&#38;#39;,
			&#38;#39;russian brides&#38;#39;,
			&#38;#39;lorazepam&#38;#39;,
			&#38;#39;adderall&#38;#39;,
			&#38;#39;dexadrine&#38;#39;,
			&#38;#39;no prescription&#38;#39;,
			&#38;#39;oxycontin&#38;#39;,
			&#38;#39;without a prescription&#38;#39;,
			&#38;#39;sex pics&#38;#39;,
			&#38;#39;family incest&#38;#39;,
			&#38;#39;online casinos&#38;#39;,
			&#38;#39;online dating&#38;#39;,
			&#38;#39;cialis&#38;#39;,
			&#38;#39;best forex&#38;#39;,
			&#38;#39;amoxicillin&#38;#39;
		);
		if (in_comment_post_like($lower_case_comment, $bad_comment_content)) {
			$comment_box_text = wordwrap(trim($post_comment_content), 80, &#38;quot;\n  &#38;quot;, true);
			$txtdrop = fopen(&#38;#39;/var/log/httpd/wp_post-logger/nullamatix.com-text-area_dropped.txt&#38;#39;, &#38;#39;a&#38;#39;);
			fwrite($txtdrop, &#38;quot;  --------------\n  [COMMENT] = &#38;quot; . $post_comment_content . &#38;quot;\n  --------------\n&#38;quot;);
			fwrite($txtdrop, &#38;quot;  [SOURCE_IP] = &#38;quot; . $_SERVER[&#38;#39;REMOTE_ADDR&#38;#39;] . &#38;quot; @ &#38;quot; . date(&#38;quot;F j, Y, g:i a&#38;quot;) . &#38;quot;\n&#38;quot;);
			fwrite($txtdrop, &#38;quot;  [USERAGENT] = &#38;quot; . $_SERVER[&#38;#39;HTTP_USER_AGENT&#38;#39;] . &#38;quot;\n&#38;quot;);
			fwrite($txtdrop, &#38;quot;  [REFERER  ] = &#38;quot; . $_SERVER[&#38;#39;HTTP_REFERER&#38;#39;] . &#38;quot;\n&#38;quot;);
			fwrite($txtdrop, &#38;quot;  [FILE_NAME] = &#38;quot; . $_SERVER[&#38;#39;SCRIPT_NAME&#38;#39;] . &#38;quot; - [REQ_URI] = &#38;quot; . $_SERVER[&#38;#39;REQUEST_URI&#38;#39;] . &#38;quot;\n&#38;quot;);
			fwrite($txtdrop, &#38;#39;--------------**********------------------&#38;#39;.&#38;quot;\n&#38;quot;);
			header(&#38;quot;HTTP/1.1 406 Not Acceptable&#38;quot;);
			header(&#38;quot;Status: 406 Not Acceptable&#38;quot;);
			header(&#38;quot;Connection: Close&#38;quot;);
			wp_die( __(&#38;#39;bang bang.&#38;#39;) );
		}
	}
}
add_action(&#38;#39;init&#38;#39;, &#38;#39;drop_bad_comments&#38;#39;);&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>

