Download the PHP package plinker/system without Composer

On this page you can find all versions of the php package plinker/system. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package system

PlinkerRPC - System

A system component which gives you access to server information.

Install

Require this package with composer using the following command:

Client

Creating a client instance is done as follows:

<?php
require 'vendor/autoload.php';

/**
 * Initialize plinker client.
 *
 * @param string $server - URL to server listener.
 * @param string $config - server secret, and/or a additional component data
 */
$client = new \Plinker\Core\Client(
    'http://example.com/server.php',
    [
        'secret' => 'a secret password'
    ]
);

// or using global function
$client = plinker_client('http://example.com/server.php', 'a secret password');

Methods

Once setup, you call the class though its namespace to its method.

Enumerate

The enumerate method is used to call multiple methods in a single call to reduce RPC requests.

Parameter Type Description Default
methods string array A string or an array of methods []
params array An array of params []

The method could be used to call a single method, or multiple with parameters.

Call

Response

Arch

Returns the system architecture.

Call

Response

Clear Swap

Clear swap space, requires root, so should be used with task.

Call

Response

CPU Info

Returns information about the CPU.

Parameter Type Description Default
parse bool Parse output into an array true

Call

Response

Disk Space

Returns disk space left in percentage.

Parameter Type Description Default
path string A directory of the filesystem or disk partition. /

Call

Response

Disks

Return mounted disks.

Parameter Type Description Default
parse bool Parse output into an array true

Call

Response

Distro

Get system distro name.

Call

Response

Drop Cache

Drop memory caches, requires root, so should be used with task.

Call

Response

Hostname

Get the systems hostname.

Call

Response

Load

Get the systems load averages.

Parameter Type Description Default
parse bool Parse output into an array true

Call

Response

Logins

Returns an array of system logins.

Call

Response

Machine ID

Returns the machine-id for the system, generates one if does not have one.

Call

Response

Memory Stats

Returns an array of memory stats for, used, cached and free in percentage values.

Call

Response

Memory Total

Get the total amount of memory in kB

Call

Response

Netstat

Get network connections.

Parameter Type Description Default
parse bool Parse output into an array true

Call

Response

Ping

Ping a hostname and return connection timing in milliseconds.

Parameter Type Description Default
host string Server hostname
port int Service port, defaults to web 80

Call

Response

PStree

Return system process tree

Call

Response

Reboot

Reboot the server, requires root, so should be used with task.

Call

Response

CPU Usage

Returns the current CPU usage in percentage value.

Call

Response

System Updates

Check whether the system has updates.

Call

Response

Top

Get top output as an array.

Parameter Type Description Default
parse bool Parse output into an array true

Call

Response

Total Disk Space

Get total disk space in bytes.

Parameter Type Description Default
path string A directory of the filesystem or disk partition. /

Call

Response

Uname

Get system name/kernel version.

Call

Response

Uptime

Get system uptime string.

Call

Response

Testing

There are no tests setup for this component.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please contact me via https://cherone.co.uk instead of using the issue tracker.

Credits

Development Encouragement

If you use this project and make money from it or want to show your appreciation, please feel free to make a donation https://www.paypal.me/lcherone, thanks.

Sponsors

Get your company or name listed throughout the documentation and on each github repository, contact me at https://cherone.co.uk for further details.

License

The MIT License (MIT). Please see License File for more information.

See the organisations page for additional components.


All versions of system with dependencies

PHP Build Version
Package Version
Requires plinker/core Version >=0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package plinker/system contains the following files

Loading the files please wait ....