kdsxchris Posted March 9, 2009 Share Posted March 9, 2009 I'm writing a simple custom http web server in java. So far, everything is working great. I want to add support for cgi scripting, and the biggest problem is how to tell php what the headers and other get/post information is. I can read post/get information within java when a request from a client is made. I can also use java to call the method php-cgi.exe to execute a php script. However, if the php script requires post information, (ie: <?php echo $_POST['username']; ?>) I do not know how to pass this information along to php. Does anyone have any idea how a normal webserver, like apache, tells php what the post information and other headers are? Quote Link to comment Share on other sites More sharing options...
corbin Posted March 11, 2009 Share Posted March 11, 2009 The initialization of a CGI application is fairly simple. All you have to do is write the POST data on the stdin to the program, and some environmental variables will need to be set. No idea how to do that in Java though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.