Contactez-nous : 01 71 18 39 72
Suivez-nous sur Facebook

PHP Syndicate content

Triggering a PHP script when your Postfix server receives a mail

In this tutorial, we will see how to trigger a PHP script each time your web server is receiving some mail.

Why would you want to do that? Well you could want to do that to develop a custom mailing list system, to archive your mail in database, trigger commands in your website by sending mails... your imagination is the limit.

Getting started with a basic Postfix filter

Configuring Postfix

New feature: install processes coming to Mouf

A new feature is coming to Mouf: install processes.
This has been a long awaited feature (yes, at least 2 people requested it :) )

What it means is that a package developer can now trigger a custom install process when its package is installed. And this is great!

It means that most of the work to set up a package can be performed during the install. For instance, a database connection package could set up the connection by asking the user the connection parameters... A package that request an instance to be created could create it directly, etc...

My mails are being treated like spam! What should I do?

Lately, I've been working on the Butterflive website where users can subscribe. As part of this process, users are sent automated mails (to check if the mail address they provide is correct or not). Alas, my mails were filtered as Spam by my own mail server.

In this article, I'll describe step by step what I did to solve the problem, what was successful and what did not work as expected.

The environment

First, a quick word about the environment:

  • Mails are sent in PHP, using the Zend_Mail component of the Zend framework

Installing APC op-code cache on Ubuntu 10.04

In this article, I will explain how to install the APC opcode cache in a few easy steps, on Ubuntu 10.04.
APC is an opcode cache (and more). When a PHP script is run, it is compiled by PHP internally, before executing it. PHP does not store the compiled result, therefore, next time the script is run, PHP will compile it again. APC is designed to store the result in its cache. This way, when PHP executes again a script, APC will serve the compiled script from the cache. PHP won't have to parse the script again, and it will save a lot of time.

First step: install PECL

Installing the PHP geolocalization extension on CentOS

Lately, I've had the need to install a geolocation database on a web server to localize (as closely as possible) a visitor based on its IP address.

For this, I've been using the MaxMind geolocation database. Although Maxmind is a commercial service, they provide a free database mapping IPs to countries.
Maxmind provides a PHP geoip extension enabling a very quick access to the GeoIp database.

In this blog article, I'll describe all the required steps to install the geoip extension on a PHP server, on a CentOS distribution.

GET or POST? Best practices for choosing the HTTP method

Last night, I read a not so old post from Brandon Savage about why "every developer should write their own framework". Very interesting reading, especially since I love writing my own frameworks. But I could not imagine how right he could be.