A bit of background: I have a form on a public website that should send data to the apache server behind my firewall. I do not want to provide direct access to this web host from the Internet.
This is currently what I am doing: I have an IIS server in my DMZ, this IIS server is the only IP address available to access the apache server through the firewall. As a workaround, I install IIS using Application Request Routing to present the Apache window through IIS to the Internet.
* What I would like to do: * Be able to somehow capture and then submit the form without presenting the Apache box on the Internet. The trick here is that the POST will come from anywhere on the Internet, be captured by the IIS server, and then transferred from the IIS server to the apache field. I learned this with PHP / cURL, but not sure if using something like this will do the trick:
<?php $todo = ""; while (list($name, $value) = each($HTTP_POST_VARS)) { $todo.=$name."=".$value."&"; } $ch = curl_init('http://mylanserver/capture.php'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $todo); curl_exec ($ch); curl_close ($ch); ?>
Can someone point me in the right direction? Thanks.
jqapi
source share