On Mon, 11 Nov 2002, David Busby wrote:
> Zavier,
> Using PHP You can do a ``, shell_exec, or passthru to run another
> process, (search for the word "exec" on php.net). Using that and PostgreSQL
> command pg_dump you can pull it off, might take a while, here's some
> untested code with no error checking
>
> <?php
> $db = $_GET['db'];
> $cmd = "pg_dump -c -D -f /tix/miner/miner.sql -F p -N -U postgres $db";
> $res = `$cmd`;
> // Alternate: $res = shell_exec($cmd);
> echo $res;
> ?>
He might need to start the $cmd with "/path/to/pg_dump...
unless the pgsql path is in httpd's path.