printer_list

(PHP 4 >= 4.0.4)

printer_list -- Return an array of printers attached to the server

Description

array printer_list (int enumtype [, string name [, int level]])

The function enumerates available printers and their capabilities. level sets the level of information request. Can be 1,2,4 or 5. enumtype must be one of the following predefined constants:

Example 1. printer_list() example

/* detect locally shared printer */
var_dump( printer_list(PRINTER_ENUM_LOCAL | PRINTER_ENUM_SHARED) );