Encoding Word characters on PHP
Filed Under (PHP) by admin on 23-02-2009
Use the following PHP code to encode Microsoft Office Word special formatting characters (like m dash, bullets, typographic quotation marks, etc) as HTML entities.
Welcome to my blog!Here I try to keep useful information about IT, mostly related to Web development and Linux stuff. Any comments or feedback that you might have will be much appreciated! Encoding Word characters on PHPFiled Under (PHP) by admin on 23-02-2009Use the following PHP code to encode Microsoft Office Word special formatting characters (like m dash, bullets, typographic quotation marks, etc) as HTML entities. Disabling PHP’s safe_mode on PleskFiled Under (PHP, Plesk) by admin on 17-01-2007In Plesk, you can disable on a per-domain basis PHP’s safe_mode. Before doing this though, be advised that disabling safe_mode could lead to security risks for all of your domains on the server. Read the rest of this entry » Horde 3.0.5 / Plesk 7.5.4 ExploitFiled Under (Linux, PHP, Plesk) by admin on 13-08-2006Running a check on Apache’s default logs (/var/log/httpd/access_log), I found attempts to exploit the server thru a “backdoor” in Horde. I haven’t fully checked what could be done with this exploit but certainly leaving the affected script unprotected is an open invitation for trouble. Read the rest of this entry » Using a better PHP mail() functionFiled Under (PHP) by admin on 18-06-2006When working with new programmers, and sometimes even experienced ones, I found that most of the time they would know how to solve a problem and code its solution but they wouldn’t be aware of security related implications. In this article, I’ll show how to improve security on PHP forms that use mail(). For a very simple Web site, a common usage of PHP is to create a contact form that will received visitor’s information and send it thru mail to the responsible of the Web site. The solution to this task is quite easy: create a form on HTML which will do a POST of the fields to a PHP script, and on the script use PHP’s mail() function to send the email with the provided information. If you want to have a more flexible solution, you could even receive on the script the recipient’s address, subject or some headers for the message. Using an alternate sendmail configuration file on PHPFiled Under (Linux, PHP) by admin on 17-06-2006While I was designing a system that needed to send mass-customized emails from PHP, I faced two problems: a) change the envelope address (Return-path: header) and b) (most important) avoid overloading the server when sending the messages because of virus check. Basically, I wanted to use a different sendmail configuration file from PHP to skip the relay-mail virus check from Amavis. |
|