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!

Lord Grosse Jeanine
  • 1,111
  • 10
  • 29

1 Answers1

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

Thomas
  • 364
  • 2
  • 9
  • 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 ;) – Lord Grosse Jeanine Oct 15 '15 at 10:29
  • 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 ;-) – Thomas Oct 19 '15 at 10:11
  • 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 you – justrohu Dec 07 '15 at 11:16