Forums > MaxMSP

run cgi script


wk
July 14, 2006 | 12:28 pm

Hello,

what`s the best way to run remote cgi script (and pass values to it?)

sending "download http://domain/script?val=0" to jit.uldl doesn`t seem
to work,

is shell a way to go?

thanks,
wojciech


July 14, 2006 | 2:15 pm

I had a situation where I was able to run a script with the download…
message to jit.uldl when using a mac. no luck on PC.

John.


July 14, 2006 | 3:22 pm

Your solution could depend on what the cgi sends back. If you are
retrieving an image, jit-webimage-example.pat in the examples folder
might be the simplest way to go. The code shows how simple it can be
to retireve values using a URL. If anything, getting text back is even
simpler, and can be done in much the same way.

For more complex HTTP requests, if you can work with Java, Jakarta
Commons HttpClient can get you up and running with surprisingly few
lines of code. It can also let you handle login/password access
transparently.

http://jakarta.apache.org/commons/httpclient/

Sometimes it helps to debug things locally. If you’re on a Mac, you
can run your local web server (Personal Web Sharing in System
Preferences/sharing) and set up a simple Perl script in
/Library/Webserver/CGI-Executables directory.

HTH,

– Paul


—– |(*,+,#,=)(#,=,*,+)(=,#,+,*)(+,*,=,#)| —–


Viewing 3 posts - 1 through 3 (of 3 total)