次のリクエストを送信する必要があります。これは、xml の末尾にユーザー名とパスワードを含む XML です。ブラウザーに貼り付けると、これを URL として機能させることができます。
URL?XML=<>...</>&user=123456&password=123456
しかし、curl 呼び出しを作成しようとすると、無効な XML 要求であると表示されます。
POSTFIELDS内にユーザーとパスワードを入れてみました。$trial ='&user=123456&password=123456' の前にそれらを変数として設定しようとしましたが、まだ機能していないようです。
$xml = <<<ENDOFXML
<?xml version="1.0" encoding="UTF-8"?><xmldata>...</xmldata>
ENDOFXML;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/x-www-form-urlencoded'));
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'xml='.urlencode($xml).urlencode('&user=123456&password=123456'));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_close($ch);