ASP页面的XML响应

I have been trying to send xml message from php to asp and output response to my php page using CURL but having no luck in receiving any response. This is what I have tried:

<?php
$url = "https://someweb.asp";
$post_string = "xmlmessage=<?xml version='1.0' encoding='UTF-8'?> 
<abc>
<UserId>123</UserId> 
</abc>";

//$header  = "POST HTTPS/1.0 
";
$header = "Content-type: text/xml 
";
$header .= "Content-length: ".strlen($post_string)." 
";
$header .= "Content-transfer-encoding: text 
";
$header .= "Connection: close 

"; 
$header .= $post_string;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);

$output = curl_exec($ch);
$info = curl_getinfo($ch);

if ($output == false || $info['http_code'] != 200) {
  $output = "No cURL data returned for $url [". $info['http_code']. "]";
  if (curl_error($ch))
    $output .= "
". curl_error($ch);
  }
else
    {curl_close($ch);}

echo $output;
?>

Can anyone please guide me where i am wrong?

$post_string = "xmlmessage=<?xml version='1.0' encoding='UTF-8'?> 
<abc>
<UserId>123</UserId> 
</abc>";

swap the double and single quotes

$post_string = 'xmlmessage=<?xml version="1.0" encoding="UTF-8"?> 
<abc>
<UserId>123</UserId> 
</abc>';

single quotes are not valid in xml markup

Don't build a custom request for a simple POST. CURL is perfectly capable of doing a post without all those shenanigans:

$xml = <<<EOL
<?xml version='1.0' encoding='UTF-8'?> 
<abc>
<UserId>123</UserId> 
</abc>
EOL;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('xmlmessage' => $xml));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);

$result = curl_exec($ch);
if ($result === FALSE) {
    die(curl_error($ch));
}

echo $result