PHP Classes

File: clipshow.php

Recommend this page to a friend!
  Classes of Luis Martinez Ulloa   PHP Termux API   clipshow.php   Download  
File: clipshow.php
Role: Example script
Content type: text/plain
Description: Clipboard Example
Class: PHP Termux API
Control Android device using Termux application
Author: By
Last change: Runtimne conditions
Date: 7 years ago
Size: 364 bytes
 

Contents

Class file image Download
<?php

   
require_once 'termuxapi.php';

   
$termux = new termuxapi();
   
$oldclip = "";
    while (
true) {

       
sleep(1);
       
$clp = $termux->clipboard_get();
        if (
$clp !== $oldclip) {
           
$oldclip = $clp;
           
$termux->toast($clp);
           
$termux->notification($clp, "clipshow", "Clipshow");
        }
    }