} break; case 'delete': $device_id = 19534; $radiodev_counter = 0; $removed = $gapi->removeRadio($device_id, $radiodev_counter); if ($removed) { echo "Radio <strong>{$radiodev_counter}</strong> at device <strong>{$device_id}</strong> removed correctly.<br />\n<br />\n"; } else { echo "There was an error deleting the radio.<br />\n"; echo $gapi->getErrorsStr(); } break; case 'nearest': $node_id = 14095; $nearest = $gapi->nearestRadio($node_id); if ($nearest) { if ($nearest->radios) { $radios = $nearest->radios; echo "<br />\n"; echo "Found some radios:\n"; echo '<ul>' . "\n"; foreach ($radios as $radio) { echo "<li>\n"; echo " SSID: <strong>{$radio->ssid}</strong><br />\n"; echo " Device ID: <strong>{$radio->device_id}</strong><br />\n"; echo " Radiodev_counter: <strong>{$radio->radiodev_counter}</strong><br />\n"; echo " Distance: <strong>{$radio->distance} km</strong>\n"; echo "</li>\n"; } echo "</ul>\n";