MichaelHenriksen.dk Random bits and bytes…

13Jan/100

Why you should NOT use strip_tags()

In the world of Web 2.0, it’s becoming more and more common to allow users to submit rich text in comments, profile text etc. with the possibility of pimping it with HTML formatting.
This is of course a nice thing, because it makes it possible for the users to express themselves better, but you should [...]

8Dec/095

Dompdf and special characters

When generating dynamic PDF documents in PHP I normally use the excellent TCPDF library, but in my last project I wanted to try out another library called domdf.
From the dompdf website:
dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) CSS2.1 compliant HTML layout and rendering engine written in PHP. It is [...]

8Nov/090

Handling messages in web applications – Part 2

Welcome to part two of Handling messages in web applications. Part one went through how the message handler system is built. This part will show how to actually implement and use the component in a Zend Framework application.

8Nov/090

Handling messages in web applications – Part 1

Messages are a very important part of an application. Messages inform users about what is happening in the system and what the result of their actions is, so therefore it is critical to have a good and consistent way to display messages in an application.
In this post I will show how a message handling system [...]

13Oct/090

Fixing a strange problem with IE8, SSL and Excel

The other day, me and a colleague of mine experienced a strange problem when trying to download a Microsoft Excel spreadsheet in Internet Explorer 8 from one of our web applications. After a bit of googling we came across an article on the Microsoft support site, describing a problem in Internet Explorer 6 and 5 [...]

1Oct/090

Implementing PHPIDS in Zend Framework

Security is a very important part of an application, especially if the system handles sensitive data or requires high availability. In this post I’m going to show how to integrate PHPIDS, which is a fantastic Intrusion Detection System for PHP applications, in Zend Framework.
Setting up PHPIDS in Zend Framework
First of all, we need to set [...]