]> git.ipfire.org Git - thirdparty/cups.git/blame - scripting/php/phpcups.php
Merge changes from CUPS 1.5.1-r9875.
[thirdparty/cups.git] / scripting / php / phpcups.php
CommitLineData
b423cd4c 1#!/usr/bin/php -f
ef416fc2 2<?
3//
4// "$Id: phpcups.php 3603 2003-04-11 18:42:52Z mike $"
5//
321d8d57 6// PHP test script for CUPS.
ef416fc2 7//
321d8d57 8// Copyright 2007-2011 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 19if(!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 28print("Functions available in the $module extension:\n");
ef416fc2 29
b423cd4c 30foreach ($functions as $func)
31{
32 print("$func\n");
ef416fc2 33}
ef416fc2 34
b423cd4c 35print("\n");
36
37print("cups_get_dests:\n");
38print_r(cups_get_dests());
39
40print("cups_get_jobs(\"\", 0, -1):\n");
41print_r(cups_get_jobs("", 0, -1));
42
43print("cups_print_file(\"test\", \"../../test/testfile.jpg\", "
44 ."\"testfile.jpg\", ...):\n");
45print_r(cups_print_file("test", "../../test/testfile.jpg", "testfile.jpg",
46 array("scaling" => "100",
47 "page-label" => "testfile.jpg")));
48
49print("cups_print_files(\"test\", array(\"../../test/testfile.jpg\", "
50 ."\"../../test/testfile.ps\"), \"testfiles\", ...):\n");
51print_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?>