Get DLNA informations with PHP
Asked Answered
M

1

9

I've got a DLNA server on a Raspberry Pi (which works with miniDLNA). I've got another Raspberry Pi with a web server on it (using nGinx).

I'd like to get informations about my DLNA server with my PHP code on the web server (scann for DLNA servers, get list of files, etc.).

How can I do that? Is it possible to communicate with DLNA in PHP?

NOTE: I've found this: https://github.com/jalder/UPnP but it's not updated anymore and it doesn't work with miniDLNA 1.1.2 (Jessie). Plus I'd like to do it myself!

Monolatry answered 12/10, 2015 at 10:7 Comment(0)
A
5

DLNA is an alliance between companies, they use UPnP (Universal Plug And Play) to let their devices communicate with each other.

To do it yourself, you might want to look at GUPnP for which PHP has an extension http://php.net/manual/en/book.gupnp.php

Alessandro answered 14/10, 2015 at 10:26 Comment(3)
I red this documentation a while ago but I was hoping to find something more handy and easy/quick to approach. I guess if I want to do everyhting myself I don't have so much choices. I'm surprised that there isn't more stuff about the DLNAorUPnP/PHP communication on the internet though. Anyway thx for answering mate ;)Monolatry
It always starts with someone. If you have something working, consider making it open source. This way everyone can expand on your solutions and, who knows, maybe someday a plug and play UPnP solution is only one composer require away ;-)Alessandro
I am trying to install gupnp extension on ubuntu 14.10 but getting this PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212+lfs/gupnp.so' - /usr/lib/php5/20121212+lfs/gupnp.so: undefined symbol: g_thread_init in Unknown on line 0, the extension.so file is present at its path Any idea why this is happening, thank youProperty

© 2022 - 2024 — McMap. All rights reserved.