php-upnp/examples/discover-devices.php

14 lines
269 B
PHP
Raw Normal View History

2017-02-16 15:29:55 +00:00
<?php
require_once __DIR__."/../vendor/autoload.php";
use NoccyLabs\UPnP\SSDP\Discovery;
use NoccyLabs\UPnP\SSDP\SearchTarget;
$discovery = new Discovery();
$discovery->discover(SearchTarget::ROOT_DEVICE);
foreach ($discovery as $device) {
echo $device."\n";
}