]> git.ipfire.org Git - thirdparty/cups.git/blob - scripting/php/phpcups.php
0b5669327810f8effae02c1eae45fdb2263b4bac
[thirdparty/cups.git] / scripting / php / phpcups.php
1 #!/usr/bin/php -f
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 //
8 // Copyright 1997-2006 by Easy Software Products, all rights reserved.
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
20 // Hollywood, Maryland 20636 USA
21 //
22 // Voice: (301) 373-9603
23 // EMail: cups-info@cups.org
24 // WWW: http://www.cups.org/
25 //
26
27 // Make sure the module is loaded...
28 if(!extension_loaded("phpcups"))
29 {
30 dl("phpcups.so");
31 }
32
33 // Get the list of functions in the module...
34 $module = "phpcups";
35 $functions = get_extension_funcs($module);
36
37 print("Functions available in the $module extension:\n");
38
39 foreach ($functions as $func)
40 {
41 print("$func\n");
42 }
43
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")));
65
66 //
67 // End of "$Id: phpcups.php 3603 2003-04-11 18:42:52Z mike $".
68 //
69 ?>