]>
Commit | Line | Data |
---|---|---|
b423cd4c | 1 | #!/usr/bin/php -f |
ef416fc2 | 2 | <? |
3 | // | |
4 | // "$Id: phpcups.php 3603 2003-04-11 18:42:52Z mike $" | |
5 | // | |
6 | // PHP test script for the Common UNIX Printing System (CUPS). | |
7 | // | |
b423cd4c | 8 | // Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 9 | // |
10 | // These coded instructions, statements, and computer programs are the | |
11 | // property of Easy Software Products and are protected by Federal | |
12 | // copyright law. Distribution and use rights are outlined in the file | |
13 | // "LICENSE.txt" which should have been included with this file. If this | |
14 | // file is missing or damaged please contact Easy Software Products | |
15 | // at: | |
16 | // | |
17 | // Attn: CUPS Licensing Information | |
18 | // Easy Software Products | |
19 | // 44141 Airport View Drive, Suite 204 | |
b423cd4c | 20 | // Hollywood, Maryland 20636 USA |
ef416fc2 | 21 | // |
22 | // Voice: (301) 373-9603 | |
23 | // EMail: cups-info@cups.org | |
b423cd4c | 24 | // WWW: http://www.cups.org/ |
ef416fc2 | 25 | // |
26 | ||
27 | // Make sure the module is loaded... | |
b423cd4c | 28 | if(!extension_loaded("phpcups")) |
29 | { | |
30 | dl("phpcups.so"); | |
ef416fc2 | 31 | } |
32 | ||
33 | // Get the list of functions in the module... | |
b423cd4c | 34 | $module = "phpcups"; |
ef416fc2 | 35 | $functions = get_extension_funcs($module); |
36 | ||
b423cd4c | 37 | print("Functions available in the $module extension:\n"); |
ef416fc2 | 38 | |
b423cd4c | 39 | foreach ($functions as $func) |
40 | { | |
41 | print("$func\n"); | |
ef416fc2 | 42 | } |
ef416fc2 | 43 | |
b423cd4c | 44 | print("\n"); |
45 | ||
46 | print("cups_get_dests:\n"); | |
47 | print_r(cups_get_dests()); | |
48 | ||
49 | print("cups_get_jobs(\"\", 0, -1):\n"); | |
50 | print_r(cups_get_jobs("", 0, -1)); | |
51 | ||
52 | print("cups_print_file(\"test\", \"../../test/testfile.jpg\", " | |
53 | ."\"testfile.jpg\", ...):\n"); | |
54 | print_r(cups_print_file("test", "../../test/testfile.jpg", "testfile.jpg", | |
55 | array("scaling" => "100", | |
56 | "page-label" => "testfile.jpg"))); | |
57 | ||
58 | print("cups_print_files(\"test\", array(\"../../test/testfile.jpg\", " | |
59 | ."\"../../test/testfile.ps\"), \"testfiles\", ...):\n"); | |
60 | print_r(cups_print_files("test", array("../../test/testfile.jpg", | |
61 | "../../test/testfile.ps"), | |
62 | "testfiles", | |
63 | array("scaling" => "100", | |
64 | "page-label" => "testfile.jpg"))); | |
ef416fc2 | 65 | |
66 | // | |
67 | // End of "$Id: phpcups.php 3603 2003-04-11 18:42:52Z mike $". | |
68 | // | |
69 | ?> |