Apple looses ALAC

by admin on oktober 28, 2011

ALAC, wich stands for ”Apple Lossless is a lossless audio codec that Apple developed some time ago for digital music. The codec can compress music files anywhere from 40-60% of their original size with no discernible loss in audio quality (…)

Read the rest of this entry »

WordPress categories with descriptions

by admin on september 12, 2011

Some WordPress-themes has the description of the category below the category name. This is not standard in WordPress. So this is how you can do it

Charset

by admin on augusti 31, 2011

For those of you who have troubles with Charset (it’s easy to forget!) in your code, you can add the code to your .htaccess to make sure that all your pages are shown in correct charset! Even if you forget (…)

Read the rest of this entry »

Email validation with filter_var

by admin on juli 26, 2011

When having a website that allows user-registration it’s good to check that the user data inputed is valid. A lot of people use RegExp to check if an email is valid. This is generally not the best way to do (…)

Read the rest of this entry »

Secure GET with intval

by admin on juli 26, 2011

A big problem, and a rather common one, is that users try to modify (read: hack) a websites to do things that the code wasen’t supposed to. Such as allow a basic user – to gain admin-access. This can easily (…)

Read the rest of this entry »

RegExp snippets

by admin on juli 26, 2011

I recently came across a webpage that shares some RegExp code for some verification-purposes. And as i use RegExp a lot in my projects to check/validate – i thought i’d share it with the rest of you. Validate username Validate (…)

Read the rest of this entry »

Filter out duplicate data from MySQL

by admin on juli 26, 2011

Alright – i did this big mistake – i forgot to check and see if a user-email was registerd in the database before another user was added (i wasen’t going to allow 2 account per email!). If i had a (…)

Read the rest of this entry »

censor-functions

by admin on juli 24, 2011

Needed a simple function to check for bad words on my webpage – so i made a function for it. Just wrap it around your variable like this: And make sure that your functions.php file contains this code: