Skip to content

A general purpose network library with some Linux commands.

Notifications You must be signed in to change notification settings

eugenefvdm/network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

network

##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";

About

A general purpose network library with some Linux commands.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages