投稿する複数XML_PAYLOADの があります (while ループごとに異なる xml 投稿)。ループを実行するPOSTと、最初のループのデータのみになり$iます。ループPOSTごとに新しいデータを取得するにはどうすればよいですか?$i
$i = 0;
while ($i < $num) {
...data
define("XML_PAYLOAD", "<?xml stuff and tags?>");
define("XML_POST_URL", "http://theurl");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, XML_POST_URL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POSTFIELDS, XML_PAYLOAD);
$result = curl_exec($ch);
curl_close($ch);
$i++;
}