From 70ffed48ec70358d70ca90053c2d1cb25e7f2295 Mon Sep 17 00:00:00 2001 From: Benoit Garret Date: Mon, 27 Jan 2020 09:22:11 +0100 Subject: [PATCH] Explain how to connect to a remote CUPS server --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 772f945..5ad8475 100644 --- a/README.md +++ b/README.md @@ -24,14 +24,26 @@ composer require smalot/cups-ipp Then, require the `vendor/autoload.php` file to enable the autoloading mechanism provided by Composer. Otherwise, your application won't be able to find the classes of this component. - ## Requirements -This library use unix sock connection: `unix:///var/run/cups/cups.sock` +### Local connection + +This library uses the unix sock connection: `unix:///var/run/cups/cups.sock` First of all, check if you have correct access to this file: `/var/run/cups/cups.sock` +````php +$client = new Client(); +```` + +### Remote connection + +````php +$client = new Client("username", "password", ["remote_socket" => "tcp://REMOTE_IP:631"]); +```` + + ## Implementation ### List printers