]>
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 | // | |
bc44d920 | 8 | // Copyright 2007 by Apple Inc. |
b423cd4c | 9 | // Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 10 | // |
11 | // These coded instructions, statements, and computer programs are the | |
bc44d920 | 12 | // property of Apple Inc. and are protected by Federal copyright |
13 | // law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
14 | // which should have been included with this file. If this file is | |
15 | // file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 16 | // |
17 | ||
18 | // Make sure the module is loaded... | |
b423cd4c | 19 | if(!extension_loaded("phpcups")) |
20 | { | |
21 | dl("phpcups.so"); | |
ef416fc2 | 22 | } |
23 | ||
24 | // Get the list of functions in the module... | |
b423cd4c | 25 | $module = "phpcups"; |
ef416fc2 | 26 | $functions = get_extension_funcs($module); |
27 | ||
b423cd4c | 28 | print("Functions available in the $module extension:\n"); |
ef416fc2 | 29 | |
b423cd4c | 30 | foreach ($functions as $func) |
31 | { | |
32 | print("$func\n"); | |
ef416fc2 | 33 | } |
ef416fc2 | 34 | |
b423cd4c | 35 | print("\n"); |
36 | ||
37 | print("cups_get_dests:\n"); | |
38 | print_r(cups_get_dests()); | |
39 | ||
40 | print("cups_get_jobs(\"\", 0, -1):\n"); | |
41 | print_r(cups_get_jobs("", 0, -1)); | |
42 | ||
43 | print("cups_print_file(\"test\", \"../../test/testfile.jpg\", " | |
44 | ."\"testfile.jpg\", ...):\n"); | |
45 | print_r(cups_print_file("test", "../../test/testfile.jpg", "testfile.jpg", | |
46 | array("scaling" => "100", | |
47 | "page-label" => "testfile.jpg"))); | |
48 | ||
49 | print("cups_print_files(\"test\", array(\"../../test/testfile.jpg\", " | |
50 | ."\"../../test/testfile.ps\"), \"testfiles\", ...):\n"); | |
51 | print_r(cups_print_files("test", array("../../test/testfile.jpg", | |
52 | "../../test/testfile.ps"), | |
53 | "testfiles", | |
54 | array("scaling" => "100", | |
55 | "page-label" => "testfile.jpg"))); | |
ef416fc2 | 56 | |
57 | // | |
58 | // End of "$Id: phpcups.php 3603 2003-04-11 18:42:52Z mike $". | |
59 | // | |
60 | ?> |