initial clean commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Menking\Meshcore\Environment;
|
||||
use Menking\Meshcore\Meshcore;
|
||||
|
||||
require(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
if( !isset($argv[1]) ) die("{$argv[0]} <port>\n");
|
||||
|
||||
Environment::configure($argv[1]);
|
||||
|
||||
$mc = Meshcore::getInstance();
|
||||
|
||||
$mc->appStart("getstatusreq");
|
||||
|
||||
$contacts = $mc->getContacts();
|
||||
$idx = 1;
|
||||
foreach($contacts as $contact) {
|
||||
echo "(" . $idx++ . ") {$contact['contact_name']}\n";
|
||||
}
|
||||
|
||||
$choice = readline("\nPlease select contact to attempt remote login: ");
|
||||
$contact = $contacts[$choice - 1];
|
||||
|
||||
echo "Using {$contact['contact_name']}\n";
|
||||
|
||||
print_r($mc->login($contact['pub_key'], ''));
|
||||
|
||||
$ts = $mc->statusRequest($contact['pub_key']);
|
||||
|
||||
print_r($ts);
|
||||
|
||||
$mc->poll();
|
||||
Reference in New Issue
Block a user