Communicating with PHP

fairesigneaumachiniste's icon

I would like my max patch to communicate with a php script on my server and just wondered if anyone had an opinion on the best way to do this?

UDPSend/receive and Netsend/receive are obvious choises.

CNMAT did something with php once but I can't find it. Anyone know the object I mean?

nathan wolek's icon

We had some PHP and OSC talking to Max from Second Life in a project by one of my students last year. Read the following paper and email her or me any questions you may have.

Megan England
mne3w@virginia.edu

Nathan Wolek
nwolek@stetson.edu

damiano's icon

If you like to use OSC you can use the OSC.php script that you can download from http://andy.schmeder.net/freesoftware (you can access this also from http://opensoundcontrol.org/ website).
If you don't like to use OSC you can find in the script OSC.php the function OSCClient, that use UDP socket.
You can use this function to send unformatted message to Max.
For max side I use java object [mxj net.udp.recv], in my experience it work very fine.