Skip to content

asvvvad1/clipboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clipboard for PHP

Provide copying and pasting to the Clipboard for PHP.

PHP port of 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
  • Android using Termux: Requires Termux:API add-on
  • Windows: Copying works normally but pasting requires paste.exe to be in PATH or it'll fallback to using powershell which a bit slow.

Usage

composer require asvvvad/clipboard:dev-master
require 'vendor/autoload.php';

$c = new Clipboard();

if ($c->isUnsupported() === false) {
	$c->writeAll('copied');
	echo $c->readAll(); // "copied"
}

Used in:

My own cply-php

About

Best clipboard wrapper for PHP. Windows, Mac, Unix. Linux (X11 & Wayland) and Termux

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages