peperunas
peperunas

Reputation: 438

Exchange data between Python and PHP

Is it possible to exchange data between a PHP page and a Python application? How can I implement a PHP page that reacts to a Python application?

EDIT:

My application is divided in 2 parts: the web backend and a Python daemon. Via the web backend I upload MP3s to my server; these MP3s are processed by my Python daemon which fetch metadata from Musicbrainz.

Now:

I need to ask the user the results of the "Python fetch" to choose the right metadata. Is this possible?

Upvotes: 4

Views: 441

Answers (1)

Tobias
Tobias

Reputation: 4292

Write a Python script that takes a path in sys.argv or the audio data via sys.stdin and writes metadata to sys.stdout. Call it from PHP using exec.

Upvotes: 1

Related Questions