Savyon
Savyon

Reputation:

How to receive UDP broadcasts with PHP

I am trying to receive a repeated UDP broadcast with PHP and display it on a webpage on local host.

How would I accomplish this?

Upvotes: 1

Views: 741

Answers (1)

Demian Brecht
Demian Brecht

Reputation: 21368

I would most likely have a daemon or server process running that would be responsible for receiving the UDP broadcast and appending it to either a file or database (this could be implemented in any language). I would then have a PHP page that either reads the file or queries the database for results and echoing the results on the page.

If you're looking for live updates, then I'd be adding some jQuery/AJAX scripting magic.

Upvotes: 1

Related Questions