Есть обработчик:
$Passw = md5($arWS['PASSW']);
foreach($arWsParts as $arPart){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://auto1.by/api/Tradesoft/?action=get_price_list&login=".$arWS['LOGIN']."&password=".$Passw."&code=".urlencode($arPart['ARTICLE'])."&producer=".urlencode($arPart['BRAND']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($ch);
curl_close($ch);
$jsonRes = json_decode($json);
//echo "http://auto1.by/api/Tradesoft/?action=get_price_list&login=".$arWS['LOGIN']."&password=".$Passw."&code=".urlencode($arPart['ARTICLE'])."&producer=".urlencode($arPart['BRAND'])
//echo '<br><pre>'; print_r($json); echo '</pre><br><br>';
if(is_array($jsonRes)){
//echo '<pre>'; print_r($jsonRes); echo '</pre>';//die();
foreach($jsonRes as $obRes){
//Make valid Price array
$arPrice = TDMPriceArray($arPart);
//Webservice data
$arPrice["ARTICLE"] = (string)$obRes->code;
$arPrice["ALT_NAME"] = (string)$obRes->caption;
$arPrice["BRAND"] = (string)$obRes->produсer;
$arPrice["PRICE"] = (string)$obRes->price;
$arPrice["CURRENCY"] = $arWS['CURRENCY'];
$arPrice["DAY"] = (string)$obRes->delivery;
$arPrice["AVAILABLE"] = (string)$obRes->rest;
$arPrice["OPTIONS"] = '';
//Price options
$arOps = Array();
$MINIMUM = (string)$obRes->minquantity;
if($MINIMUM>1){$arOps['MINIMUM']=$MINIMUM;}
$arPrice["OPTIONS"] = TDMOptionsImplode($arOps,$arPrice);
//Add new record
$arPrices[] = $arPrice;
}
}elseif(is_object($jsonRes)){
if($jsonRes->errorCode>0){
if($jsonRes->errorCode==301){continue;} //No results
$ERROR = $jsonRes->errorMessage.' ['.$jsonRes->errorCode.']';
break;
}
}
}
начинает работать правильно, получает все цены и ссылки, но при запросе цены выдает ошибку:
Parse error: syntax error, unexpected ';' in /home/poehalib/public_html/autoparts/tdmcore/webservices/auto1.by.php on line 37
37 строка - curl_setopt($ch, CURLOPT_URL,"
auto1.by/api/Tradesoft/?action=get_price_list&login=".$arWS['LOGIN']."&password=".$Passw."&code=".urlencode($arPart['ARTICLE'])."&producer=".urlencode($arPart['BRAND']);
в чем ошибка? помогите...