cvs: peardoc /en/package/networking net-dns.xml

From: Date: Mon, 11 Apr 2005 12:57:41 +0000
Subject: cvs: peardoc /en/package/networking net-dns.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5924@lists.php.net to get a copy of this message
ekilfoil Mon Apr 11 08:57:41 2005 EDT Modified files: /peardoc/en/package/networking net-dns.xml Log: The example had some wrong variable names http://cvs.php.net/diff.php/peardoc/en/package/networking/net-dns.xml?r1=1.5&r2=1.6&ty=u Index: peardoc/en/package/networking/net-dns.xml diff -u peardoc/en/package/networking/net-dns.xml:1.5 peardoc/en/package/networking/net-dns.xml:1.6 --- peardoc/en/package/networking/net-dns.xml:1.5 Sun Apr 10 19:21:58 2005 +++ peardoc/en/package/networking/net-dns.xml Mon Apr 11 08:57:39 2005 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <sect1 id="package.networking.net-dns"> <title>Net_DNS</title> <para> @@ -417,7 +417,7 @@ // We should only send the request to the master server // accepting DNS updates for the zone. -$r->nameservers = array('192.168.0.254'); +$resolver->nameservers = array('192.168.0.254'); // We must manually construct the DNS packet for a DNS update // First we must instantiate the packet object @@ -426,7 +426,7 @@ // Create the header for the update packet. Most of the defaults are // acceptable, but we must set the header OPCODE to "UPDATE" $packet->header = new Net_DNS_Header(); -$packet->header->id = $r->nextid(); +$packet->header->id = $resolver->nextid(); $packet->header->qr = 0; $packet->header->opcode = "UPDATE"; @@ -495,13 +495,13 @@ // // After creating your packet, you must send it to the name server for // processing. DNS updates must use the send_tcp() method: -$response = $r->send_tcp($packet, $packet->data()); +$response = $resolver->send_tcp($packet, $packet->data()); // // The response from the server will vary. If the update was successfuly, the // server will have a response code of "NOERROR". Any other error types will // be reported in the response packet's header "rcode" variable. -if ($ans->header->rcode != "NOERROR") { - return($ans->header->rcode); +if ($response->header->rcode != "NOERROR") { + return($response->header->rcode); } ?>

« previous php.pear.doc (#5924) next »