Using popen() with nsupdate : popen « File Directory « PHP






Using popen() with nsupdate

 
<?php
$ph = popen('/usr/bin/nsupdate -k keyfile')               or die($php_errormsg);
if (-1 == fputs($ph,"update delete test.example.com A\n")) { die($php_errormsg); }
if (-1 == fputs($ph,"update add test.example.com 5 A 192.168.1.1\n"))
                                                           { die($php_errormsg); }
pclose($ph)                                               or die($php_errormsg);
?.
  
  








Related examples in the same category

1.Using popen() and pclose()
2.Using popen() to Pass Data to the column Application
3.Using popen() to Read the Output of the Unix who Command
4.Reading output from popen()
5.Opening a Process File Pointer with popen()
6.Opening a Unidirectional Pipe Using popen()
7.Redirecting standard output
8.Reading standard error