dns_export_to_bind_retrans_daily.php 369 Bytes
Newer Older
tbrehm's avatar
tbrehm committed
1 2 3 4
<?php
$host="IP_ADDRESS";
$user="USERNAME";
$password="PASSWORD";
5
mysql_connect($host, $user, $password) or die(mysql_error());
tbrehm's avatar
tbrehm committed
6 7 8 9 10
mysql_select_db("dbispconfig");
$result = "";
$result = mysql_query("SELECT origin FROM dns_soa ORDER BY origin ASC;");
while($row = mysql_fetch_array($result))
{
11 12
	$zone=substr($row["origin"], 0, -1);
	system("rndc retransfer ".$zone);
tbrehm's avatar
tbrehm committed
13
}
14
?>