Tag: secure

  • php: Send xml/soap to Secured Server

    Sample requires curl see code below: function callWebServicePost($host, $url, $payload, $user, $password) { $header[] = “Host: “. $host; $header[] = “Content-type: text/xml”; $header[] = “Content-length: “.strlen($payload) . “\r\n”; $header[] = $payload; $session = curl_init($url); // Tell curl to use HTTP POST curl_setopt ($session, CURLOPT_POST, true); curl_setopt($session, CURLOPT_CONNECTTIMEOUT,30); // Tell curl that this is the body […]