Using
echo "location:$siteUrl";
shows that no values are going into the query string, even though they may print.
So this curl exercise still does not work. What does it take to make it work? Who knows?
Fortunately, I now have an alternative (no curl):
<?php
$siteUrl="http://receivingsite/receivingfile.jsp?";
foreach($_POST as $key => $value)
{
$url .="$key=" . urlencode($value) . "&";
}
header ("Location: $siteUrl");
//echo "location:$siteUrl";
?>
It works.
Solved!