Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 09 NOV 2006 12:05:38PM Frank Ritts wrote:

Hi all,

 It's payback time.

This is for all the times I received problem solvers on this BB and the code or whatever, made my day easier. I hope this helps someone else.

This is a PHP script that we run on a web server between two firewalls, or DMZ, and talks through a port to Oecgi.exe on a web server inside both firewalls, running OI7.2.2, and which furnishes request to the outside web server.

Enjoy

Frank

Here is the script.

$v) {

         $tmp_key=urlencode(is_int($k) ? $numeric_prefix.$k : $k);
         if ($key) {
             $tmp_key=$key.''.$tmp_key.'';
         }
         if ( is_array($v) || is_object($v) ) {
             $res=http_build_query($v, null, $tmp_key);
         } else {
             $res=$tmp_key."=.urlencode($v);
         }
     }
     return implode("&", $res);
 }

}

if (!$_POST) {

$ch= curl_init("http://mywebserver/mywebpage");

curl_setopt($ch, CULOPT_RETURNTRANSFER,1);

}

else {

$post_vars=http_build_query($_POST);
 $ch=curl_init("http://mywebserver/cgi-bin/oecgi.exe");
 curl_setopt($ch, CURLOPT_POST,1);
 curl_setopt($ch, CULOPT_RETURNTRANSFER,1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);/**/

}

$result=curl_exec($ch);

curl_close($ch);

?]


At 09 NOV 2006 03:05PM Bob Carten wrote:

Thanks Frank.

With your example you can have a public Linux / Apache server call a private Windows / Sambar server.


At 09 NOV 2006 06:26PM Frank Ritts wrote:

I should have made that clear.

Frank

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/1975e2b76400b77185257221005de664.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1