php-upnp/examples/discover-igd.php

14 lines
280 B
PHP

<?php
require_once __DIR__."/../vendor/autoload.php";
use NoccyLabs\UPnP\SSDP\Discovery;
use NoccyLabs\UPnP\SSDP\SearchTarget;
$discovery = new Discovery();
$discovery->discover(SearchTarget::URN_SCHEMA_DEVICE_IGD_2);
foreach ($discovery as $device) {
print_r($device);
}