Dear Gurus,
I have a code to post XML data via HTTPS site but it is failing. The response i am getting is that i am send nothing. here below is the code:
$url = "https://localhost/receivee.php?auth=124455rjfjfj";
$post_data = array("XML" => $postfields);
$xml = http_build_query($post_data);
$stream_options = array(
"ssl" => array(
"verify_peer" => false,
"verify_peer_name" => false),
$url => array(
"method" => "POST",
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"Content-length: " . strlen($xml),
"content" => $xml,
)
);
$context = stream_context_create($stream_options);
$response = file_get_contents($url, 0, $context);
return $response;