使用 eBay 获取子类别 API

Get child categories using eBay API

我需要使用 eBay API 从 eBay 获取所有子类别。我写了下面的代码,但它只获得了根级类别。谁能指导我如何获得父类别的子类别。

function curl($url){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_FAILONERROR,1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 15);
    $result = curl_exec($ch); 
    curl_close($ch);
    return $result;
 }

 $url= 'http://open.api.ebay.com/Shopping?callname=GetCategoryInfo&appid=3b5sdsdsdsd&siteid=0&CategoryID=1&version=949IncludeSelector=ChildCategories';  
 $xml = curl($url);
 $xml = simplexml_load_string($xml);
 print_r($xml);

我终于找到了解决方案 :) 这是 link example code in this link