POST or GET from http form

Hi Chaps

I am trying to cut some corners here and probably not done as much searching as I should but I am sure that the combined intellects of this forum should come up with an answer that I need quick.
I am a complete bodger with applescript but I have managed to run most of my photographic workflow on it. I am now trying to configure a server to do some tricks and I am wayout of my depth.

I am trying to parse info from a web form to applescript so that applescript will be able to do stuff to various images. All I need is to be pointed in the right direction with handle CGI request.

What I will have is a standard web form ie:

Enter your message:

I would like xxx to be an applescript to recieve the data in “msg”

I know that I need to save the script as remain open app. but I dont understand how applesscript gets the data from he form. I can do this in php but I would like to use applescript for the proccessing


Browser: Safari 523.15
Operating System: Mac OS X (10.5)

This might help.



Hi Craig

I have looked at that and I cant get it to work on my server. What I need to understand is how I can get the variable msg into the apple script.

something like

handle CGI request with posted data msg
--do stuff wth msg


To make this a little clearer the the php equivalent is
form code:

Enter your message:

the message.php might be:

<?php // retrieve form data $input = $_POST['msg']; // use it echo "You said: $input"; ?>

I know this returns a web page but at this point but i dont need to with applescript. i just need to use the info in the text returned of the form

Apple Note:

Did you set that up?

On another note. Have you thought of writing the data to a file with PHP and then having a stay open
script read the file gathering the necessary information?



First: No I have not installed the ACGI. Sounds important. Will do.
Second: Have no idea how to write the results of the form to a text file though I could write the applescript to gather the info


This should get you going. There are some good php tutorials
on reading/writing files. I found this one with a google search.