XMLFormatter2 is a XML beautifying tool deriving from XML_Formatter originally developed by Žilvinas Šaltys. If you are in need of handling big files you should still resort to that solution, since it reads chunks of data at a time using file streams. Maybe at some point I will integrate that too…. (or maybe I should just simply do it right now).

So what is it about:

  • it is a very small PHP class
  • taking an XML input string
  • fixing XML indentation (indenting being the reason I first looked for the original tool)
  • and finally giving you an nicely formatted XML output string as a result

If you are looking for an easy way to indent XML strings in PHP this is for you. The most common usage example would be a requirement to fix the reading style of some “compressed” XML string you got from a third-party application.

Here a quick usage example:


$data = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>....';

try {
  $formatter = new XMLFormatter2();
  echo $formatter->format($data);
} catch (Exception $e) {
  echo $e->getMessage(), "\n";
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

DOWNLOAD:  XMLFormatter2 (1239 downloads)

RSS Feed Generator 1.0 (RSS1, RSS2, ATOM)

This is a very simple RSS Feed Generator for PHP.

ORIGINAL GPLed VERSION of “Universal Feed Writer” by Anis uddin Ahmad found

The changes applied include, but are not restricted to:

  1. easier to read identation and documentation, a little code cleanup
  2. both classes FeedWriter and FeedItem in one file
  3. header updated to be application/xml, charset utf-8
  4. single elements with no content can now be added like ‘
  5. namespaces can now be added manually
  6. channel elements can now have attributes
  7. all relevant methods now return $this (concatenation)

The included RSS2 example application is running directly on this URL – have fun and let me know about bugs!

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)

DOWNLOAD: RSS Feed Generator for PHP (1883 downloads)

PHP EPP library IT-NIC (v4.3)

I am very sorry for the long delay in updating this, but I was busy with some other projects and completely missed to update the whole thing on the webpage…. so if anyone would ever feel inclined to donate something for the work, feel free to do so – I won’t forget the project and you’ll keep getting updates 🙂

Let me summarize the updates you missed in between v4.1, v4.2 and v4.3 in a single post today. Most important is the introduction of german SZ handling in v4.2, which will change to IDNAbis (IDN’s to be introduced later this year by the italian domain name registry).

Version 4.3

Now checking PHP Version in order not to break php version older than 5.2.3
when using htmlspecialchars (4th parameter was only added in v5.2.3).

Added support for delayedDebitAndRefundMsgData polling type data. Thanks
Angelo for the input!

Version 4.2

Moved the AbstractObject object up into Net_EPP space.

The session file location can now be specified manually.

Added an account.poll.ack.php example for WSDL and changed the Poll method
to use ACK as default parameter. PollAll now works only with ACK.

Switched to IDNAbis-like handling of german SZ in idna_convert, as IT-NIC will
now support this.

Version 4.1

Updated the WSDL interface to version 1.2 (added a DomainChangeRegistrant
method and removed the registrant parameter from the DomainUpdate method).

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 5.00 out of 5)

DOWNLOAD:  EPP library IT-NIC (PHP) (1550 downloads)