XML POST Proxy Script using PHP and libcurl

Written by James McDonald

August 3, 2010

This is the simplest answer I could find for a client needing to POST an XML SOAP message to a server in another domain.

Not sure on the security because the POST isn’t validated so it just passes on whatever the client sends.

libcurl has a lot of options


$v)
    if(ereg('HTTP_(.+)',$h,$hp))
      echo "
  • $h = $v
  • \n";; */ # tell the client to expect an xml reply header("Content-Type: text/xml"); # then send the the xml reply from the webservice echo $xml; # close the session to free up resources curl_close($session); /* This dumps all the session variables from PHP woo hoo! var_dump(get_defined_vars()); */ ?>

    0 Comments

    Submit a Comment

    Your email address will not be published. Required fields are marked *

    You May Also Like…

    How to Research a CPU Upgrade

    How to Research a CPU Upgrade

    Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...