Category: Programming

WordPress: CloudFlare-Country-Login

This snippet allows us to tap into the CF_IPCountry [1] header and determine if this country is allowed to login. We put allowed countries into the array situated in the cf_country_login() function. Put this snippet into your theme’s functions.php and you’re all done, but don’t forget to first edit $urel and the default array of

phpBB Stop Forum Spam

I had very little to-do so I crafted a basic, simple hook for phpBB3 which queries the API of StopForumSpam and checks if the IP address is located there, if the result is possitive, a message is displayed and the application exits. Simple, yet effective. Credit to Maurice Randall for base of the code; I merely

Is your VPS provider overselling?

You can find out if your VPS is overselling the memory with utilities such as this one: (author lowendbox) Shell script: Or this Ruby one: They more or less work the same, all of them. The C code is probably best with regard to memory utilization though. For more comphrensiv reading with details, see:

cPanel Account Creators?

I’ve spent some hours today reviewing various “cPanel Account Creator” scripts because I had a personal interest in these things. Namely, I thought about creating a more professional way for my potentional users to create their own account via some form of integration with WordPress. I had it all figured out, design and all, because

PunBB Incapsula Extension

I decided to hastily write an extension for PunBB, for those having a site (or domain, rather) on the Incapsula service — the extension will simply output the correct IP address; because in all other cases the IP of the Incapsula service will be shown as the originating IP all across your PunBB forum, which

Varnish not playing nice

As most of my readers know I’ve been caught up with improving the server the last couple of weeks and I’ve had great success with much of it. Most recantly I’ve played with Varnish — which no doubt worked very well — but up to now things took another turn and I seemed to get

Varnish Update

As I wrote in this post there were some issues with Varnish in the WP-Admin area. These seem to be gone now, more or less. I’m still testing to see if everything is working, so far I can: add posts edit posts change theme options That’s what I’ve tried so far. Installing plugins and themes should