eugenevdm / network
A basic networking library.
1.0.21
2017-01-30 15:46 UTC
Requires
- eugenevdm/helpers: ^1.0
README
##Description
A PHP network library that provides various common network functions.
List of all commands for Linux
- DNS
- memory
- ping
- traceroute
- uptime
- version
- whois
Installation
composer require eugenevdm/network
Example Commands
$result = Network::whois('snowball.co.za'); die(print_r($result, 1));
echo Network::ping('196.25.1.1');
echo Network::traceroute('196.25.1.1');
See tests.php
in the root folder for more examples.
SSH
SSH Installation
sudo apt-get install php-ssh2 && sudo /etc/init.d/apache2 restart
SSH Usage
$config = \Helpers\Helpers::Config('ssh'); $host = new Linux($config['host'], $config['username'], $config['password']); var_dump ($host->dns());; echo $host->version() . "\n"; echo $host->uptime() . "\n"; echo $host->ping() . "\n";