curl lib를 사용하여 PHP로 문제가 발생했습니다. 내가 달성하고자하는 것은 curl로 불리는 두 개의 서로 다른 url로부터 반환 된 xml을 가져 오는 여러 요청을하는 것입니다. 내가 처음 호출 내가 값을 추출 할 수 있도록,하지만 두 번째 전화를 걸 때이 값을 추출 할 수 있지만,이 첫 번째 전화의 값 때PHP Curl 다중 요청 문제
$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
**/
: 여기에 코드입니다.
이 코드 조각은 괜찮은 것 같습니다. 어쩌면 다른 곳에서 실수를 저지르고있는 것일 수 있습니다. –
컬 부분이 괜찮습니까? –