So I was asked to help with at a wordpress site, that was “hacked” 3 times in a row. The admin saw a screen saying “c99madshell blog version” when trying to access the plugin installation page.
First thing to do:
Search all files that contain the word “eval”, the search gave me the following [...]
Here is a function I wrote to easily add email attachments using PHP’s mail function.
At the moment it’s specifically for zip files, since I’m only using it for mailing zip files, but you can change that to anything.
When I’m not busy in the future, I’ll update this script and add some documentation
Updates:
I’m writing a plugin for wordpress to import csv files from gmail into a database, before inserting I want to validate the address using the filter_var method, for some reason this method always returned false for every record I loaded from the csv. When I tried validating by calling it manually filter_var(“test@test.com”, FILTER_VALIDATE_EMAIL), everything worked [...]
This took me a couple of nerve breaking hours to figure out, so I thought I’d share it with the rest of the world.
The problem: I wanted to connect my HTC Sensation phone running Android 2.3.3 to my home wifi network that’s broadcasted by a Speedtouch modem. After configuring the WPA code, the phone [...]
I was searching for a Jquery snippet that allows me to simply add a preload class to an image to have it preloaded in the background while showing a spinner. Like:
All preload scripts I found using google where either not working with classes or too bloaty, so I decided to write my own:
First [...]
I’m running a WAMP installation on my home pc for developing software in PHP, recently I installed Microsoft Visual Studio 2010 aswell for some experimenting with MVC in ASP.NET. This was running perfectly untill I decided to install the Microsoft WebMatrix, that installed IIS 7 and turned on the service automatically on port 80. Not [...]
I’m currently doing the quickstart tutorial on my home pc with Windows 7 with a WAMPServer 2.1 installation and came across some problems that are not discussed in the quickstart tutorial itself.
Create a Model and Database Table
When running
I got the following error
‘dbname’ is not recognized as an internal or [...]
Abstract Factory
The abstract factory pattern (aka Provider pattern) is a software design pattern that provides a way to encapsulate a group of individual factories that have a common theme.
When to use
The Abstract Factory pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes. This pattern [...]
When designing or developing a webpage or application there usually is a point the CSS code just seems it’s getting out of hand and unmanageable.
Here’s a list of tips to create better, manageable, reusable and organised CSS code.
Seperate content from style, never use inline style Use correct semantics Use correct and meaningful naming [...]
PHP Design Patterns: Factory
Factory
Singleton is a design pattern that forces the classes that implement it to offer only one point of access to them.
When to use
The essence of the Factory method Pattern is to “Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a [...]
-
Calendar
May 2012 M T W T F S S « Jan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 -
Meta

