Forum Moderators: coopster & phranque

Message Too Old, No Replies

Processing procmail piped email trouble...

Using contents of email to run an .exe

         

Duncs

11:18 am on Dec 11, 2003 (gmt 0)

10+ Year Member



Hey guys/gals

I am having serious problems overcoming a firewall for my interactive web page.

I am using an HTML <form> to supply user defined inputs for an .exe program that we want to make widely available. The form inputs will be used by the program, whcih runs on our system, with the image output being emailed to the user after 30 mins or whenever it finishes.

I am using a PHP script to handle the <form> inputs, [after being checked by JavaScript]. Unfortunately i found i have no access to writing directly from the php to our disks. [the firewall] This i need to do, as the .exe runs of a file, i.e. "parameter.dat".

Hence my more complicated way of accomplishing this:

Php mails the inputs to my internal address, which has a procmail script running. This filters ones which are requests from the form and pipes the email to another program. I don't want procmail to write the file itself because it writes a "blurb" as well about when the mail was recieved, not just the vital content whcih contains the variables.

Basically i am confused what language to use to handle this email. I want it to retrieve the variables from the content of the email, while ignoring the blurb.
Then i want it to write these to a specific file which can be recognised by the .exe. Then i need to call the .exe, and wait for however long it takes before emailing the produced image back to the user.

I have been recommended to do this in perl, but php would be easier...

What do you reckon?!

Duncs

alexwilli

10:58 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



I definitely recommend perl. It was built for this type of job.

Of course a better option is to create an application which can catch the port 80 traffic from the HTML form and skip all the email stuff.

It doesn't matter how your firewall is setup, if you can read port traffic, with the correct application and file system security settings you can definitely write a simple file.