Skip to content

Articles about PHP

Thoughts on software development, games, design, and the things I learn along the way.

Advertisement Talescape

Introducing Laravel Teapot

A few years ago I wrote about a simple idea: instead of maintaining huge fail2ban regexes for every weird scanner path, let your Laravel app return a very specific HTTP status code when a request clearly looks like automated probing, then let fail2ban ban the IP based on that status code.

Webforms with Custom Templates in Drupal 7

Webform is basically the standard module for creating custom forms in Drupal. By default Webforms are treated as editorial content and therefore just have an automatically created id (like nodes). However most of the time you want to be able to create forms in a local environment and deploy them to your live website. Today I will explain you how.

Drupal: Insert PHP

Drupal's PHP filter enables users to use raw PHP code in text fields. While this is an extremely powerful ability, it quickly leads to serious security issues. Users with the ability to insert PHP code into your site, can practically do anything they want with your site. Also the PHP code is stored in the database and lives outside of your normal workflow. My Insert PHP module tries to fix the limitations of the PHP filter and provides a safer way to include raw PHP in your Drupal site.

Setting up the Alternative PHP Cache on Ubuntu

As some of you might know, PHP scripts are compiled to bytecode right before they are executed. This process costs time and server resources. Also this is done all over again every single time your script gets executed, even if your script hasn't been changed in years. So what could be more obvious than caching the results of the compilation to reduce load on your server. Today I want to show you one way of achieving this, with a little help from the Alternative PHP Cache (APC).

Drupal: Maintenance Node

Drupal has somewhat limited options, when it comes to displaying information during site maintenance. By default admins may enter a simple maintenance message. Most of the times this is just enough, but sometimes you want to be able to make the maintenance page look more appealing. For this reason I developed a Maintenance Node module.

RPG Creator Battles Revisited

I can't help it. Every once in a while the RPG Creator pops up in my head and I need to work on it a little. Sooner or later I get distracted by something else, but most of the times I actually make a few steps towards completion. This time I revisited the battle script and turned it into a class.

Drupal: Ubercart Product Presets

Customizing products with a lot of options can be quite annoying. Especially when you just want to buy a simple standard product. While Ubercart provides a way to create highly customizable products, it doesn't provide a way to store presets for them. At labor b designbüro I recently developed a module, which lets customers and admins store presets for products and even share them with other customers.