PHP code example of cmservice / openwrt
1. Go to this page and download the library: Download cmservice/openwrt library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cmservice / openwrt example snippets
use Cmservice\OpenWRT\Device;
echo Device::getIp(); // returns device's local ip address
echo Device::getMac(); // returns device's eth0 mac
echo Device::getNetworkId(); // returns device's network ID
echo Device::getSshKey(); // returns device's public SSH key