Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain how to connect to a remote CUPS server #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down