Mint statsI like stats. We all like stats in some form or other. It brings order to often disorganised information.
My website has been taking a lot of hits recently, far over the normal amount of traffic I get. To the left should show that quite clearly.

Bus statsAll of those extra hits have been for one particular post I made. Hampshire police bus. As you can see to the right, I’ve had close to 10,000 hits just for that post.

Apc has been taking a lot of weight off the shoulders of my server (1.24 million hits!). Admittedly, my server doesn’t just host my website, but several other popular websites too. The user cache variables are from my websites only though.

APC stats

I’m pretty thankful I run APC, mod_deflate and WP Super Cache. Without any of these my server would probably be struggling. I’d also recommend the WordPress APC object cache for those who use WordPress and have APC installed.


I’m trying out a new Pepper (plugin) for Mint called Feedback.
It’s basically a little like FeedBurner for Mint, just free.

So if my RSS feeds refresh all posts in your reader, you know why!

Update
Oops! This just crashed the server! I’ve disabled this temporarily until I find out why.
A new update has been released and it seems to be working much better!


I’ve been working on a 404 error page for the theme that I use here, Subtle.

I wanted to add error page support to the theme so I could utilise the error tracker plugin for Mint and also get search engines to adjust their listings for the website.

I wrote a funky bit of PHP code, which was inspired by A List Aparts: The Perfect 404 post.
What it does is look for a referral from a listed search engine and then get the keywords used in the search. It then assigns those keywords to the variable $new_search . That variable can then be used to populate your own search form.

< ?php
// Here we do some intelligent search engine 404 checking
// This allows us to show some links to possible relevant content
 
if(strlen($_SERVER['HTTP_REFERER']) > 0) {
 
    // We have a referer value somewhere
    // Look for a search engine query
    $engines = array('google.co', 'looksmart.co', 'altavista.co', 'msn.co', 'yahoo.co');
    for($I = 0; $I < count($engines); $I++) {
        $found = strstr($_SERVER['HTTP_REFERER'], $engines[$I]);
    }
    if(strlen($found) > 0) {
 
        // We have a search engine..
        // Split the referal up to get query used
        $query = explode('?', $found);
        $parts = explode('&', $query[1]);
        $part_count = count($parts);
 
        // Find specific search terms based on differing search engines
        $style = array('q=', 'p=', 'ask=', 'key=');
        $style_count = count($style);
 
        // start by looping through the URL parts
        for($s = 0; $s < $part_count; $s++) {
 
            // Match url parts against search query types
            for($t = 0; $t < $style_count; $t++) {
                $terms = strstr($parts[$s], $style[$t]);
                if($terms == true) {
 
                    // finish loop as we've found what we need
                    $s += $part_count;
                    $t += $style_count;
                    $terms = explode('=', $terms);
                }
            }
        }
        // Search terms to echo in the search box
        $new_search = str_replace('+', ' ', $terms[1]);
    }
}
?>

I’m sure the code could be tidied up a bit, but it does its job. Feel free to use it for your purposes!

lotsa emails this way!