php-upnp/examples/discover-igd.php

14 lines
280 B
PHP
Raw Permalink 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::URN_SCHEMA_DEVICE_IGD_2);
foreach ($discovery as $device) {
print_r($device);
}