Hi, I am having a problem using the curl lib with php. What I want to accomplish is to make multiple request pulling xml returned from two different url's that are called with curl. Here is the code:
$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
**/
When I make the first call I can extract the values, but when I make the second call I can extract the values but they are the values of the first call.