php で curl lib を使用すると問題が発生します。私が達成したいのは、curl で呼び出された 2 つの異なる URL から返された xml をプルする複数の要求を作成することです。コードは次のとおりです。
$BROWSER="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 YFF3 Firefox/3.0.1";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.wowarmory.com/character-sheet.xml?r=Crushridge&n=Thief");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $BROWSER);
$result20 = curl_exec($ch);
curl_close ($ch);
/**
I extract the values out of the xml here
**/
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.wowarmory.com/character-sheet.xml?r=Ursin&n=Kiona");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $BROWSER);
$result20 = curl_exec($ch);
curl_close ($ch);
/**
I extract the values out of the xml here
**/
最初の呼び出しを行うと値を抽出できますが、2 番目の呼び出しを行うと値を抽出できますが、それらは最初の呼び出しの値です。