<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="https://brooke.codes/wp-content/plugins/pretty-rss-feeds/xslt/pretty-feed.xsl" type="text/xsl" media="screen" ?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Geeky &#8211; &lt;Brooke&gt; &lt;Codes&gt;</title>
	<atom:link href="https://brooke.codes/category/geeky/feed/" rel="self" type="application/rss+xml" />
	<link>https://brooke.codes</link>
	<description>The Tech Blog of Brooke. </description>
	<lastBuildDate>Tue, 02 Dec 2025 21:39:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Quick Tip: Stop Forum Spam</title>
		<link>https://brooke.codes/2025/12/02/quick-tip-stop-forum-spam/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Tue, 02 Dec 2025 21:38:00 +0000</pubDate>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=1769</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/12/sfs-150x150-png.avif" class="attachment-thumbnail size-thumbnail not-transparent wp-post-image" alt="Sfs" decoding="async" data-has-transparency="false" data-dominant-color="dedee4" style="--dominant-color: #dedee4;" />Akismet is a great tool for fighting spam, however due to licensing and call limits I was looking to decrease the number of calls to Akismet. In my search for alternatives I stumbled upon Stop Forum Spam. For a free project, I have been impressed with their accuracy. While primary focused on, well forums, they [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/12/sfs-150x150-png.avif" class="attachment-thumbnail size-thumbnail not-transparent wp-post-image" alt="Sfs" decoding="async" data-has-transparency="false" data-dominant-color="dedee4" style="--dominant-color: #dedee4;" />
<p class="wp-block-paragraph"><a href="https://akismet.com/">Akismet</a> is a great tool for fighting spam, however due to licensing and call limits I was looking to decrease the number of calls to Akismet. In my search for alternatives I stumbled upon <a href="https://www.stopforumspam.com/">Stop Forum Spam</a>. For a free project, I have been impressed with their accuracy. While primary focused on, well forums, they have an API. </p>



<p class="wp-block-paragraph">Other alternatives exist but for now I have been happy with the combination of Aksimet and Stop Form Spam combined with judicial word and IP blocks when needed. </p>



<span id="more-1769"></span>



<h2 class="wp-block-heading">Spam Strategy </h2>



<p class="wp-block-paragraph">While my exact spam strategy is somewhat depending on the content type. I often use a PHP library for Akismet  in combination with a word block and/or IP block list.</p>



<p class="wp-block-paragraph">For my most recent project the strategy looked like this:</p>



<ul class="wp-block-list">
<li>First check the input against an IP list. While IP blocks are a cat and mouse game, I use it to block known spammers. I&#8217;m talking about IPs that have made more than five known spam attempts in the last fourteen days get blocked for two weeks.</li>



<li>Next, check the content against a known word block list. Again this is the low hanging fruit for the crypto and link spammers who often uses the same words or phrases in their spam. </li>



<li>Once content passes both of those, the data is checked against the Stop Forum Spam database.</li>



<li>Finally, if that passes, then check the content with Akismet.</li>
</ul>



<p class="wp-block-paragraph">I found this catches about 98% of spam. All entries require manual approval, but catching spam means less moderation. </p>



<h2 class="wp-block-heading">PHP Example code</h2>



<p class="wp-block-paragraph">Here is an example using the <a href="https://www.stopforumspam.com/usage">Stop Forum Spam API</a> with <a href="https://symfony.com/doc/current/http_client.html">Symfony HTTP Client</a>. A similar method should be possible with any Request package.  For Akismet I&#8217;m using the <a href="https://github.com/omines/akismet">Omines Akismet Package</a> as I can use the same Request package.</p>



<p class="wp-block-paragraph">One quirk of the API is that the blocklists sets the <code>frequency</code> field to 255, and the <code>lastseen</code> date to the current time (UTC). I am being somewhat conservative here and checking if the <code>lastseen</code> is within the last hour.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: php; title: ; notranslate">
/**
     * Check IP / email / username against Stop ForumSpam database
     *
     * @param string | null $ip IP address to check
     * @param string | null $email Email to check
     * @param string | null $username Username to check
     * @param int $threshold Confidence threshold(0 - 100, default: 75)
     * @param bool $checkTor include TOR exit nodes in spam detection(default: false)
     * @param bool $checkBlacklist include blacklisted entries(default: true)
     * @return bool | string false if clean, or string with reason if spam detected(&#039;confidence&#039; | &#039;tor&#039; | &#039;blacklist&#039;) {
     */
    private static function stopForumSpamLookup($ip = null, $email = null, $username = null, $threshold = 75, $checkTor = true, $checkBlacklist = true)
    {
        $client = HttpClient::create();

        $params = &#x5B;&#039;json&#039; =&gt; &#039;1&#039;, &#039;confidence&#039; =&gt; &#039;1&#039;];

        if ($checkTor) {
            $params&#x5B;&#039;badtorexit&#039;] = &#039;1&#039;;
        }
        if ($checkBlacklist) {
            $params&#x5B;&#039;nobaduser&#039;] = &#039;0&#039;;
        }

        if ($ip) {
            $params&#x5B;&#039;ip&#039;] = $ip;
        }
        if ($email) {
            $params&#x5B;&#039;email&#039;] = $email;
        }
        if ($username) {
            $params&#x5B;&#039;username&#039;] = $username;
        }

        try {
            $response = $client-&gt;request(&#039;GET&#039;, &#039;http://api.stopforumspam.org/api&#039;, &#x5B;
                &#039;query&#039; =&gt; $params
            ]);

            $data = json_decode($response-&gt;getContent(), true);

            if (!isset($data&#x5B;&#039;success&#039;]) || $data&#x5B;&#039;success&#039;] != 1) {
                return false;
            }

            foreach (&#x5B;&#039;ip&#039;, &#039;email&#039;, &#039;username&#039;] as $field) {
                if (isset($data&#x5B;$field]) &amp;&amp; $data&#x5B;$field]&#x5B;&#039;appears&#039;] == 1) {
                    if ($checkBlacklist &amp;&amp; isset($data&#x5B;$field]&#x5B;&#039;frequency&#039;]) &amp;&amp; $data&#x5B;$field]&#x5B;&#039;frequency&#039;] == 255 &amp;&amp; isset($data&#x5B;$field]&#x5B;&#039;lastseen&#039;])) {
                        $lastSeen = strtotime($data&#x5B;$field]&#x5B;&#039;lastseen&#039;]);
                        $hourAgo = time() - 3600;
                        if ($lastSeen &gt;= $hourAgo) {
                            return &#039;sfs_blacklist&#039;;
                        }
                    }

                    if ($checkTor &amp;&amp; $field === &#039;ip&#039; &amp;&amp; isset($data&#x5B;$field]&#x5B;&#039;torexit&#039;]) &amp;&amp; $data&#x5B;$field]&#x5B;&#039;torexit&#039;] == 1) {
                        return &#039;sfs_tor&#039;;
                    }

                    if (isset($data&#x5B;$field]&#x5B;&#039;confidence&#039;]) &amp;&amp; $data&#x5B;$field]&#x5B;&#039;confidence&#039;] &gt;= $threshold) {
                        return &#039;sfs_confidence&#039;;
                    }
                }
            }

            return false;
        } catch (Exception $e) {
            return false;
        }
    }
</pre></div>


<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Add the latest Linux Mint Backgrounds (13 to 14)</title>
		<link>https://brooke.codes/2012/12/04/how-to-add-the-latest-linux-mint-backgrounds-13-to-14/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Tue, 04 Dec 2012 23:23:42 +0000</pubDate>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Linux Mint]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=297</guid>

					<description><![CDATA[I recently updated my laptop to Linux Mint 14 Nadia with this update came a bunch of really great desktop backgrounds (see release notes). I am still using mint 13 on my desktop and because it&#8217;s a LTS I have no need to update. I did however want the new backgrounds. The solutions? Download the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I recently updated my laptop to<a href="https://blog.linuxmint.com/?p=2216"> Linux Mint 14 Nadia</a> with this update came a bunch of really great desktop backgrounds (see release notes). I am still using mint 13 on my desktop and because it&#8217;s a LTS I have no need to update. I did however want the new backgrounds.</p>
<p>The solutions? Download the <a href="http://packages.linuxmint.com/pool/main/m/mint-backgrounds-nadia-extra/">mint-backgrounds-nadia-extra.deb</a> and install it. And just like that you have these new backgrounds.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Happy Fourth WordPress Birthday to Me</title>
		<link>https://brooke.codes/2011/09/27/happy-fourth-wordpress-birthday-to-me/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Tue, 27 Sep 2011 18:00:50 +0000</pubDate>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=234</guid>

					<description><![CDATA[Today marks my fourth year anniversary having a WordPress.org account and when I remember first starting to use WordPress for my blog.&#160; I thought it would be fun to recap what I&#8217;ve accomplished since September 27th 2007 and what some of my long term WordPress goals are. WordPress and Me Thus Far In 2007 I [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"></p>



<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post refers to code and a project from <em>many</em> years ago <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>



<p class="wp-block-paragraph">Today marks my fourth year anniversary having a WordPress.org account and when I remember first starting to use WordPress for my blog.&nbsp; I thought it would be fun to recap what I&#8217;ve accomplished since September 27th 2007 and what some of my long term WordPress goals are.</p>



<h3 class="wp-block-heading">WordPress and Me Thus Far</h3>



<p class="wp-block-paragraph">In 2007 I started using WordPress for just my blog didn&#8217;t know what I was doing download a theme hacked up some CSS/PHP finally got everything working after hours of trying. Since that time here&#8217;s what I&#8217;ve been able to do:</p>



<ul class="wp-block-list">
<li>Became one of the Three most important people to WordPress</li>



<li>Contributed to/wrote 5 plugins with a total download count of 121,331</li>



<li>Updated 3 articles in the Codex</li>



<li>Attended WordCamp Seattle</li>



<li>Dipped my feet into WordPress Core Trac</li>



<li>Got involved in the WordPress.org Forums and at http://wordpress.stackexchange.com/</li>



<li>Updated my personal site to run completely on WordPress and Hybrid<br><br></li>
</ul>



<h3 class="wp-block-heading">What&#8217;s next?</h3>



<p class="wp-block-paragraph">Here are some of my longterm WordPress goals:</p>



<ul class="wp-block-list">
<li>Become a core contributor (even if it&#8217;s just fixing a typo)</li>



<li>Meet Matt Mullenweg</li>



<li>Continue to be involved in the Forums, discussions and Codex of WordPress</li>



<li>Attend WordCamp SF</li>



<li>Continue to attend WordCamp Seattle</li>
</ul>



<p class="wp-block-paragraph">Do you use WordPress? If so how? How long have you been using it? What are some of the things you like best?</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>New Direction</title>
		<link>https://brooke.codes/2010/02/17/new-direction/</link>
					<comments>https://brooke.codes/2010/02/17/new-direction/#comments</comments>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Wed, 17 Feb 2010 20:00:33 +0000</pubDate>
				<category><![CDATA[Geeky]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=39</guid>

					<description><![CDATA[For a while (read: since May 2008) this page has simply been a landing page for my WordPress account.  Lately I&#8217;ve been thinking about starting a tech blog. The problem, none of my current sites seamed fitting and setting up a new blog just for tech writing seamed silly.  Then it dawned on my to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>For a while (read: since May 2008) this page has simply been a landing page for my WordPress account.  Lately I&#8217;ve been thinking about starting a tech blog. The problem, none of my current sites seamed fitting and setting up a new blog just for tech writing seamed silly.  Then it dawned on my to transform this blog into my tech blog.</p>
<p>Therefore, from now on this is where I&#8217;ll post my thoughts on PHP, jQuery, WordPress and all things related. It is my goal to provide you with useful information, interesting articles, and just a place to come and hang out with the geeky side of BandonRandon.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brooke.codes/2010/02/17/new-direction/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
