Following is an example PHP script that uses SOW to read in the message.txt template and fill in the fields.
<?php
/* message.php example */
/* read, fill and output message.txt */
include 'dl_local.php';
dl_local("phpsowDL.so");
$ar= array();
$ar['header']= "Cruel Collection agency\nYou owe us, pay now!\n";
$ar['date']= 'December 01, 1938';
$ar['salute']= 'Mr. Right';
$ar['account']= '01010101';
$ar['past_due_days']= 'many many years';
$ar['amount_due']= '$0.01';
$env= new_env();
update_env($env,$ar);
$sow = new_sow('message.txt');
stroke_sow($sow, $env);
reap_sow($sow);
?>