#!/usr/bin/env php connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { unset( $astman ); } @mkdir("/home/e-smith/db/freepbx/"); $fh = fopen("/home/e-smith/db/freepbx/astdb.dump", "w"); $astdb = $astman->database_show(); foreach ($astdb as $key => $val) { if ($key == "") { continue; } if ($key == "Privilege") { continue; } fwrite($fh, "[$key] [$val]\n"); } fclose($fh); ?>