[Wolves] Fax from MySql database
sparkes
sparkes at phreaker.net
Wed Jan 7 20:56:18 GMT 2004
On Wed, 2004-01-07 at 12:51, Jono Bacon wrote:
> Hi Wayne,
>
> I have never faxed from Linux, so take this with a
> pinch of salt.
>
and increase your cancer risk acording to the press.
> Couldnt you get a command line fax program (hylafax?)
> and then do a mysqldump into a file, then cut the
> results out with a script and fax it. You could also
> use the CGI PHP to output the results of the query in
> a readable format to the file and then fax it.
>
christ jono that's going at it arse about tit.
if you are writing a script why not get the script to connect to the
database they send the fax to each person on the list.
result = query(select name, fax_number, title from database);
fax = "Dear %%%title%%% %%%name%%%
blah blah blah";
while (list(name, faxnum, title) = sql_row(result))
{
fax = ereg_replace (fax, "%%%name%%%", name);
fax = ereg_replace (fax, "%%%title%%%", title);
system (faxprogram faxnum fax) ;
}
convert to language of choice then bravo.
a decent perl guru could probably turn that into a one liner that runs
twice as fast using reg exps
sparkes
More information about the Wolves
mailing list