Mimic Console Behaviour in Max

BlitzMax Forums/BlitzMax Programming/Mimic Console Behaviour in Max

MattVonFat(Posted 2005) [#1]
How does the console recieve feedback/send data to applications. For example if you were to run the bmk.exe you can tell it what to do and it may give feedback saying "congrats it worked".

What does the console use to send and recieve the data? Is it with streams or is it something else? Can i get Max to do the same sort of thing?

Thanks
Matt


Perturbatio(Posted 2005) [#2]
is this for your php test? if so, take a look at the module I placed in the module tweaks forum.


MattVonFat(Posted 2005) [#3]
Yeah it is for the php thing. I found that in the console i could get the php to translate in to html using C:/php/php-cgi.exe (the program) and just passing the file path. So i just have to work out how to do the same in BMax.

I had a look at your module but i'm not as good at programming as i wish i was and i cant understand most of it. (while im here what does the .. do in the []?)


Perturbatio(Posted 2005) [#4]
while im here what does the .. do in the []?)


That is a slice.

The intent of the module is that you don't need to know so much about it, you just create a new CGI instance and get the environment variables you need.

there is a simple example program in the docs that demos how to print all values passed via the url.


MattVonFat(Posted 2005) [#5]
Ok. Although im going to sound stupid by saying this...i still dont quite follow. Do you mean that php would also have the data in environment variables?

I understand as far as when a cgi script is run the returned data about it is stored in the environment strings which i guess a webserver would read. Or am i completely wrong?


Perturbatio(Posted 2005) [#6]
I think I should've read your post a little more clearly.
I don't think my CGI module will help you in this specific instance.
I take it you want to pipe the query from the webserver to the php interpreter?


MattVonFat(Posted 2005) [#7]
Yeah. I will get th request for the file, put it through the php interpreter and then send the code it returns to the browser.


Perturbatio(Posted 2005) [#8]
If you're only doing it on win32 then you could use the CreateProcess win32 API call.