serialize() vs json_encode()

Posted on 04.05.2015 21:05:09 in PHP, Webcoding 0 Comments

Some of you might know the problem: You have to store a dynamic array of values in your database. But what’s the fastest solution on the php side? What’s better for the database? Any more pros and cons? I did a bit of testing and came to conclusion that json is the way to go, if you have to store an array as value to your database.

More →

Basic XSS and session security

Posted on 04.05.2015 20:41:53 in General, Goodies, PHP, Webcoding 0 Comments

Many of the websites on the internet are still totally easy to attack using Cross-Side-Scripting (XSS) and of using the sessions of other users. This is a very bad thing, especially sinse both are very easy to prevent, at least you can make it much harder for them with just a few lines of code. It’s still far away from perfect, but with this you provide a solid base security.

More →