more implementation

This commit is contained in:
Ben Menking
2026-05-10 15:27:51 -04:00
parent d053f7e3eb
commit 9eeb383ee4
7 changed files with 293 additions and 18 deletions
+31
View File
@@ -0,0 +1,31 @@
<?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("send message");
$contacts = $mc->getContacts();
echo "Found " . count($contacts) . " contacts\n";
$idx = 1;
foreach($contacts as $contact) {
echo "(" . $idx++ . ") {$contact['contact_name']} [" . substr($contact['pub_key'], 0, 6) . "]\n";
}
$choice = readline("\nPlease select contact to attempt remote login: ");
$contact = $contacts[$choice - 1];
$resp = $mc->getAdvertPath($contact['pub_key']);
print_r($resp);