PHP Developer’s Dictionary IT-SC book 240 ldap_unbind() Syntax int ldap_unbind(int ldap_pointer ) Description The ldap_unbind() function unbinds the LDAP directory pointed to by ldap_pointer . If successful, 1 will be returned; otherwise, false on error. SNMP The Simple Network Management Protocol (SNMP) is a protocol for building network management framework. On UNIX, you must also install the UCD SNMP package for this work. You can obtain this from http://ucd-snmp.ucdavis.edu . On Windows NT/2000, these functions do not require any additional components to be installed, but do note that they do not work on the Windows 95/98/Me platforms. You can read more about SNMP in the Request For Comments (RFC) 2571, which you can find at http://www.ietf.org/rfc/rfc2571.txt . snmp_get_quick_print() Syntax boolean snmp_get_quick_print() Description The snmp_get_quick_print() function, which was added in PHP 3.0.8, grabs the value of the UCD library's quick_print setting and returns true if on, or false if off. Note This function is present only when using the UCD library, which is a UNIX- only function. snmp_set_quick_print() PHP Developer’s Dictionary IT-SC book 241 Syntax snmp_set_quick_print(int quick_print) Description The snmp_set_quick_print() function, which was added in PHP 3.0.8, sets the value of the UCD library's quick_print setting. If 1 , which stands for true, is passed as quick_print , this setting will be turned on. 0 is used to turn it off. Note This function is present only when using the UCD library, which is a UNIX- only function. snmpget() Syntax string snmpget(string hostname, string community, string object_id [, int timeout [, int retries ]]) Description The snmpget() function reads the object at object_id on hostname in the read community . It will return the object value if successful, or false on an error. The optional timeout parameter enables you to provide a timeout in seconds, and if used, you can also provide the number of retries that you want to try. snmpset() Syntax bool snmpset(string hostname, string community, string object_id, string type, mixed value [, int timeout [, int retries ]]) Description PHP Developer’s Dictionary IT-SC book 242 The snmpset() function sets the value of the object_id on hostname within the read community . The type parameter must be one of the following, depending on the type of variable set on the SNMP host: • i—INTEGER • u—Unsigned INTEGER • t—TIMETICKS • a—IPADDRESS • o — OBJID • s—STRING • x—HEX STRING • d — DECIMAL STRING If you defined OPAQUE_SPECIAL_TYPES when compiling the SNMP library, you will also have access to the following types: • U —Unsigned int64 • I —Signed int64 • F —Float • D —Double The optional timeout parameter enables you to provide a timeout in seconds, and if used, you can also provide the number of retries that you want to attempt. snmpwalk() Syntax array snmpwalk(string hostname, string community, string object_id [, int timeout [, int retries]]) Description The snmpwalk() function returns an array of objects'values, starting with object_id , from hostname and the read community . If a null value is passed for object_id , the root object is assumed, and if the value does not exist, an error is returned. The optional timeout parameter enables you to provide a timeout in seconds, and if used, you can also provide the number of retries that you want to attempt. PHP Developer’s Dictionary IT-SC book 243 snmpwalkoid() Syntax array snmpwalkoid(string hostname , string community , string object_id [, int timeout [, int retries]]) Description The snmpwalkoid() function, which was added in PHP 3.0.8, returns an associative array of objects'values, starting with object_id , from hostname and the read community . If a null value is passed for object_id , the root object is assumed, and if the value does not exist, an error is returned. The optional timeout parameter enables you to provide a timeout in seconds, and if used, you can also provide the number of retries that you want to attempt. PHP Developer’s Dictionary IT-SC book 244 Chapter 7. Internet-Related Extensions This chapter describes a group of functions that are specific to the Internet. This group includes functions dealing with Internet applications such as the Apache Web server, WDDX, and VMailMgr. The chapter also discusses functions that provide network, mail, and session access. Apache Specific The Apache Web server is a highly configurable, powerful, HTTP server. Apache is the most popular Web server on the Internet for reasons that include Apache's extensibility with add-on modules, which provide extra functionality. Another reason for Apache's popularity is its multiplatform support. Apache runs on most flavors of UNIX, Windows NT/9x/2000, NetWare 5.x, and OS/2. The set of Internet-related functions described in this section provide information about the Apache resource, headers, and other functionality. Note This section assumes that the PHP module is installed as an Apache module. Most of these functions are not supported if Apache is used as a CGI. apache_lookup_uri() Syntax apache_lookup_uri(filename); Description This function performs a request for the URI defined by filename. apache_lookup_uri() requests enough information about the resource to return a class with the properties shown in Table 7.1 . Table 7.1. Properties Returned by the apache_lookup_uri() Function Status Handler Boundary the_request Uri No_cache status_line Filename No_local_copy Method Path_info Allowed Content_type Args send_bodyct Bytes_sent Clength Mtime Byterange Unparsed_uri Request_time . snmp_set_quick_print() PHP Developer’s Dictionary IT-SC book 241 Syntax snmp_set_quick_print(int quick_print) Description The snmp_set_quick_print() function, which was added in PHP 3.0.8, sets. snmp_get_quick_print() Description The snmp_get_quick_print() function, which was added in PHP 3.0.8, grabs the value of the UCD library's quick_print setting and returns true if. PHP Developer’s Dictionary IT-SC book 240 ldap_unbind() Syntax int ldap_unbind(int ldap_pointer )