<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — [Project] Keyword Checker (for links)]]></title>
		<link>https://punbb.informer.com/forums/topic/23559/project-keyword-checker-for-links/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/23559/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in [Project] Keyword Checker (for links).]]></description>
		<lastBuildDate>Tue, 31 Aug 2010 12:58:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[[Project] Keyword Checker (for links)]]></title>
			<link>https://punbb.informer.com/forums/post/137337/#p137337</link>
			<description><![CDATA[<p>I&#039;ve noticed that in addition to certain URLs coming up again and again there are also of course keywords that stay the same, and IMO, are rather unique.... like ACAI, VIAGRA etc - these kind of keywords I want blocked - just like URL Checker by Grez blocks URLs.</p><p>If anyone can mod this manifest to catch keywords from a list &quot;keywords.csv&quot; I think it could be usefull to people trying to block links ever appearing that have those keywords. After all, without good keywords, no-one will click on the links to spam sites.... [<span style="color: red">It&#039;s important only links with the keywords are blocked - not in general of course in posts as hit ratio would give loads of false positives</span>]</p><p>Here&#039;s the manifest for doing the same with URLs (URL Checker manifest.xml)<br />PS: Opinions against or for it are welcome <img src="https://punbb.informer.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />The list can be obtained <a href="http://keydogbb.info/topic196-project-keyword-checker-keywordscsv.html">here</a></p><p>[code=xml]<br />&nbsp; &nbsp; &lt;install&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;![CDATA[<br />if (!$forum_db-&gt;table_exists(&#039;url_spam&#039;))<br />{<br />&nbsp; &nbsp; $schema = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;FIELDS&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;user_id&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;datatype&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;int(7)&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;allow_null&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; false<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ip&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;datatype&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;VARCHAR(15)&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;allow_null&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; false,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;default&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;\&#039;0.0.0.0\&#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;url&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;datatype&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;VARCHAR(150)&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;allow_null&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; true,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;default&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;\&#039;\&#039;&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;time&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;datatype&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;DATETIME&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;allow_null&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; false<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;type&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;datatype&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;VARCHAR(4)&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;allow_null&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; false<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />&nbsp; &nbsp; &nbsp; &nbsp; ),<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;PRIMARY KEY&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; array(&#039;url&#039;, &#039;type&#039;)<br />&nbsp; &nbsp; );<br />&nbsp; &nbsp; $forum_db-&gt;create_table(&#039;url_spam&#039;, $schema);<br />}<br />&nbsp; &nbsp; &nbsp; &nbsp; ]]&gt;<br />&nbsp; &nbsp; &lt;/install&gt;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &lt;uninstall&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;![CDATA[<br />$forum_db-&gt;drop_table(&#039;url_spam&#039;);<br />&nbsp; &nbsp; &nbsp; &nbsp; ]]&gt;<br />&nbsp; &nbsp; &lt;/uninstall&gt;<br />&nbsp; &nbsp; &lt;hooks&gt;<br />&nbsp; &nbsp; &lt;hook id=&quot;po_end_validation&quot;&gt;&lt;![CDATA[<br />&nbsp; &nbsp; $pattern = array();<br />&nbsp; &nbsp; $pattern[] = &#039;#\[url\]([^\[]*?)\[/url\]#e&#039;;<br />&nbsp; &nbsp; $pattern[] = &#039;#\[url=([^\[]+?)\](.*?)\[/url\]#e&#039;;</p><p>&nbsp; &nbsp; $replace = array();<br />&nbsp; &nbsp; $replace[] = &#039;urlcheck(\&#039;&quot;$1&quot;\&#039;, $errors)&#039;;<br />&nbsp; &nbsp; $replace[] = &#039;urlcheck(\&#039;&quot;$1&quot;\&#039;, $errors, \&#039;$2\&#039;)&#039;;</p><p>&nbsp; &nbsp; $message = preg_replace($pattern, $replace, $message);</p><p>&nbsp; &nbsp; function urlcheck($url, &amp;$errors, $text = &quot;&quot;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; global $ext_info, $forum_user, $forum_db, $forum_url;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; $filename = $ext_info[&#039;path&#039;].&#039;/spam.csv&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; $handle = fopen($filename, &quot;r&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; $content = fread($handle, filesize($filename));<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if(strpos($content, $url)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (file_exists($ext_info[&#039;path&#039;].&#039;/lang/&#039;.$forum_user[&#039;language&#039;].&#039;/&#039;.$ext_info[&#039;id&#039;].&#039;.php&#039;))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include $ext_info[&#039;path&#039;].&#039;/lang/&#039;.$forum_user[&#039;language&#039;].&#039;/&#039;.$ext_info[&#039;id&#039;].&#039;.php&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include $ext_info[&#039;path&#039;].&#039;/lang/English/&#039;.$ext_info[&#039;id&#039;].&#039;.php&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $url = str_replace(&#039;&quot;&#039;, &#039;&#039;, $url);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SELECT&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;url&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;FROM&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;url_spam&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;WHERE&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;url = \&#039;&#039;.$url.&#039;\&#039; AND type = \&#039;post\&#039;&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $result = $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if($forum_db-&gt;num_rows($result) == 0) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#039;INSERT&#039;&nbsp; &nbsp;=&gt; &#039;user_id, ip, url, time, type&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#039;INTO&#039;&nbsp; &nbsp; &nbsp;=&gt; &#039;url_spam&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#039;VALUES&#039;&nbsp; &nbsp;=&gt; &#039;\&#039;&#039;.$forum_user[&#039;id&#039;].&#039;\&#039;, \&#039;&#039;.get_remote_address().&#039;\&#039;, \&#039;&#039;.$url.&#039;\&#039;, NOW(), \&#039;post\&#039;&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if($forum_user[&#039;num_posts&#039;] &lt; 5 &amp;&amp; $forum_user[&#039;group_id&#039;] != 2) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete_user($forum_user[&#039;id&#039;], true);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message($lang_url_spam[&#039;User deleted&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $errors[] = sprintf($lang_url_spam[&#039;URL disallowed&#039;], $url, $url);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $url = str_replace(&#039;&quot;&#039;, &#039;&#039;, $url);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if(!empty($text)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return &#039;<a href="http://&#039;.$url.&#039;">&#039;.$text.&#039;</a>&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return &#039;<a href="http://&#039;.$url.&#039;">&#039;.$url.&#039;</a>&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; ]]&gt;&lt;/hook&gt;<br />&nbsp; &nbsp; &lt;hook id=&quot;pf_change_details_signature_validation&quot;&gt;&lt;![CDATA[<br />&nbsp; &nbsp; $pattern = array();<br />&nbsp; &nbsp; $pattern[] = &#039;#\[url\]([^\[]*?)\[/url\]#e&#039;;<br />&nbsp; &nbsp; $pattern[] = &#039;#\[url=([^\[]+?)\](.*?)\[/url\]#e&#039;;</p><p>&nbsp; &nbsp; $replace = array();<br />&nbsp; &nbsp; $replace[] = &#039;urlcheck(\&#039;$1\&#039;, $errors)&#039;;<br />&nbsp; &nbsp; $replace[] = &#039;urlcheck(\&#039;$1\&#039;, $errors, \&#039;$2\&#039;)&#039;;</p><p>&nbsp; &nbsp; if ($forum_config[&#039;o_make_links&#039;] == &#039;1&#039;)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; if (!defined(&#039;FORUM_PARSER_LOADED&#039;)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; require FORUM_ROOT.&#039;include/parser.php&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; $_POST[&#039;signature&#039;] = do_clickable($_POST[&#039;signature&#039;]);<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $_POST[&#039;signature&#039;] = preg_replace($pattern, $replace, $_POST[&#039;signature&#039;]);</p><p>&nbsp; &nbsp; function urlcheck($url, &amp;$errors, $text = &quot;&quot;) {<br />&nbsp; &nbsp; &nbsp; &nbsp; global $ext_info, $forum_user, $forum_db, $forum_url;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; $filename = $ext_info[&#039;path&#039;].&#039;/spam.csv&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; $handle = fopen($filename, &quot;r&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; $content = fread($handle, filesize($filename));<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if(strpos($content, $url)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (file_exists($ext_info[&#039;path&#039;].&#039;/lang/&#039;.$forum_user[&#039;language&#039;].&#039;/&#039;.$ext_info[&#039;id&#039;].&#039;.php&#039;))<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include $ext_info[&#039;path&#039;].&#039;/lang/&#039;.$forum_user[&#039;language&#039;].&#039;/&#039;.$ext_info[&#039;id&#039;].&#039;.php&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include $ext_info[&#039;path&#039;].&#039;/lang/English/&#039;.$ext_info[&#039;id&#039;].&#039;.php&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $url = str_replace(&#039;&quot;&#039;, &#039;&#039;, $url);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SELECT&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;url&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;FROM&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;url_spam&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;WHERE&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;url = \&#039;&#039;.$url.&#039;\&#039; AND type = \&#039;sig\&#039;&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $result = $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if($forum_db-&gt;num_rows($result) == 0) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#039;INSERT&#039;&nbsp; &nbsp;=&gt; &#039;user_id, ip, url, time, type&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#039;INTO&#039;&nbsp; &nbsp; &nbsp;=&gt; &#039;url_spam&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#039;VALUES&#039;&nbsp; &nbsp;=&gt; &#039;\&#039;&#039;.$forum_user[&#039;id&#039;].&#039;\&#039;, \&#039;&#039;.get_remote_address().&#039;\&#039;, \&#039;&#039;.$url.&#039;\&#039;, NOW(), \&#039;sig\&#039;&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if($forum_user[&#039;num_posts&#039;] &lt; 5 &amp;&amp; $forum_user[&#039;group_id&#039;] != 2) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; delete_user($forum_user[&#039;id&#039;], true);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; message($lang_url_spam[&#039;User deleted&#039;]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $errors[] = sprintf($lang_url_spam[&#039;URL disallowed&#039;], $url, $url);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $url = str_replace(&#039;&quot;&#039;, &#039;&#039;, $url);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if(!empty($text)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return &#039;<a href="http://&#039;.$url.&#039;">&#039;.$text.&#039;</a>&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return &#039;<a href="http://&#039;.$url.&#039;">&#039;.$url.&#039;</a>&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; ]]&gt;&lt;/hook&gt;<br />&nbsp; &nbsp; &lt;hook id=&quot;ain_items_end&quot;&gt;&lt;![CDATA[<br />&nbsp; &nbsp; ?&gt;<br />&nbsp; &nbsp; &lt;div class=&quot;ct-set group-item&lt;?php echo ++$forum_page[&#039;item_count&#039;] ?&gt;&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;ct-box&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;h3 class=&quot;ct-legend hn&quot;&gt;&lt;span&gt;URL spam checker&lt;/span&gt;&lt;/h3&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;ul class=&quot;data-list&quot;&gt;<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &lt;?php<br />&nbsp; &nbsp; &nbsp; &nbsp; $query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SELECT&#039;&nbsp; &nbsp; =&gt; &#039;us.user_id, u.username, us.ip, us.url, DATE_FORMAT(us.time, \&#039;%Y-%m-%d\&#039;) AS date, us.type&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;FROM&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;url_spam AS us&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;JOINS&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;LEFT JOIN&#039;&nbsp; &nbsp; =&gt; &#039;users AS u&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ON&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;u.id = us.user_id&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;ORDER BY&#039;&nbsp; &nbsp; =&gt; &#039;time DESC&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; &nbsp; &nbsp; $result = $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; &nbsp; &nbsp; ?&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li&gt;&lt;table&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;&lt;th style=&quot;width: 100px;&quot;&gt;User&lt;/th&gt;&lt;th style=&quot;width: 70px;&quot;&gt;IP&lt;/th&gt;&lt;th style=&quot;width: 300px;&quot;&gt;URL&lt;/th&gt;&lt;th style=&quot;width: 70px;&quot;&gt;Date&lt;/th&gt;&lt;th style=&quot;width: 50px;&quot;&gt;Type&lt;/th&gt;&lt;/tr&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while($spam = $forum_db-&gt;fetch_assoc($result)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;tr&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;td&gt;&quot;.((!empty($spam[&#039;username&#039;])) ? &quot;&lt;a href=\&quot;&quot;.forum_link($forum_url[&#039;user&#039;], $spam[&#039;user_id&#039;]).&quot;\&quot;&gt;&quot;.forum_htmlencode($spam[&#039;username&#039;]).&quot;&lt;/a&gt;&quot; : &quot;DELETED&quot;).&quot;&lt;/td&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;td&gt;&quot;.$spam[&#039;ip&#039;].&quot;&lt;/td&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;td&gt;&lt;small&gt;&quot;.$spam[&#039;url&#039;].&quot;&lt;/small&gt;&lt;/td&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;td&gt;&quot;.$spam[&#039;date&#039;].&quot;&lt;/td&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;td&gt;&quot;.$spam[&#039;type&#039;].&quot;&lt;/td&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;/tr&gt;&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ?&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;center&gt;&lt;i&gt;Last 25 entries. Ordered by date.&lt;/i&gt;&lt;/center&gt;&lt;/li&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ul&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &nbsp; &lt;?php<br />&nbsp; &nbsp; ]]&gt;&lt;/hooks&gt;<br />[/code]</p>]]></description>
			<author><![CDATA[null@example.com (KeyDog)]]></author>
			<pubDate>Tue, 31 Aug 2010 12:58:18 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/137337/#p137337</guid>
		</item>
	</channel>
</rss>
