Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

reset($snmp);
while(list($key, $value) = each($snmp))
{
print($value. "
\n");
}
?>


array snmpwalkoid(string host, string community, string
object, integer timeout, integer retries)


The snmpwalkoid function is an alias to snmpwalk.


WDDX


The Web Distributed Data Exchange, or WDDX, is an XML language for describing data
in a way that facilitates moving it from one programming environment to another. The
intent is to relieve difficulty associated with sending data between applications that
represent data differently. Traditionally this has been done by designing special interfaces
for each case. For instance, you may decide that your PERL script will write out its three
return data separated with tabs, using a regular expression to extract the text you later
convert to integers. WDDX intends to unify the effort into a single interface. If you wish
to learn more about WDDX, visit the home site at http://www.wddx.org/.


In order to use the functions in this section, you need only use --with-wddx when
configuring PHP prior to compilation. At the time of this writing WDDX support wasn't
compiled into the Windows binaries.


Andrei Zmievski added WDDX support to PHP.


wddx_add_vars(integer packet_identifier, string variable, ...)


The wddx_add_vars function is one of three functions for creating packets
incrementally. After creating a packet with wddx_packet_start, you may add as
many variables as you wish with wddx_add_vars. After the packet_identifier
argument, you may pass strings with the names of variables in the local scope or arrays of
strings. If necessary, PHP will explore multidimensional arrays for names of variables.
The variables will be added to the packet until you use wddx_packet_end to create
the actual packet as a string. See wddx_packet_start, below, for an example of use.


value wddx_deserialize(string packet)


The wddx_deserialize function returns a variable representing the data contained in
a WDDX packet. If the packet contains a single value, it will be returned as an

Free download pdf