$ar){ if($nt < $time - 2){ unset($todelete[$nt]); foreach($ar as $act){ if($act[0] == "http"){ unlink("cacert-{$act[1]}.txt"); } else if($act[0] == "dns") { $dnscalls .= "update delete {$act[1]}._cacert._auth." . ZONENAME . " TXT\n"; } } } } file_put_contents("data.php", ""); if($dnscalls != ""){ dnsAction($dnscalls); } function dnsAction($command) { $call = "server localhost\n$command\nsend\nquit\n"; $nsupdate = popen("/usr/bin/nsupdate -k " . KEYNAME, 'w'); fwrite($nsupdate, $call); $retval = pclose($nsupdate); // nsupdate doesn't return anything useful when called this way }