Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asvvvad1/clipboard
Best clipboard wrapper for PHP. Windows, Mac, Unix. Linux (X11 & Wayland) and Termux
https://github.com/asvvvad1/clipboard
bsd clipboard linux php php7 solaris termux unix wayland windows
Last synced: 12 days ago
JSON representation
Best clipboard wrapper for PHP. Windows, Mac, Unix. Linux (X11 & Wayland) and Termux
- Host: GitHub
- URL: https://github.com/asvvvad1/clipboard
- Owner: asvvvad1
- License: bsd-3-clause
- Created: 2020-04-21T11:43:41.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-01T15:33:14.000Z (over 3 years ago)
- Last Synced: 2024-12-18T08:16:23.399Z (about 1 month ago)
- Topics: bsd, clipboard, linux, php, php7, solaris, termux, unix, wayland, windows
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Clipboard for PHP
Provide copying and pasting to the Clipboard for PHP.PHP port of [atotto/clipboard](https://github.com/atotto/clipboard) except for the Windows part
> #### Requires PHP 7.2.0 and above
## Platforms:
* **OSX**
* **Linux, Unix/BSD**: Requires `xclip` or `xsel` to be installed
* * **Wayland**: Requires [wl-clipboard](https://github.com/bugaevc/wl-clipboard)
* **Android using Termux**: Requires Termux:API add-on
* **Windows**: Copying works normally but pasting requires [paste.exe](https://www.c3scripts.com/tutorials/msdos/paste.html#exe) to be in PATH or it'll fallback to using powershell which a bit slow.## Usage
```bash
composer require asvvvad/clipboard:dev-master
``````php
require 'vendor/autoload.php';$c = new Clipboard();
if ($c->isUnsupported() === false) {
$c->writeAll('copied');
echo $c->readAll(); // "copied"
}```
## Used in:
My own [cply-php](https://github.com/asvvvad/cply-php)