Improved README. Added example configuration file. Improved code to legacy PHP versions