error_reporting(0);
include ('config.php');
$categoria=$_REQUEST['categoria'];
$categorias=$_REQUEST['categorias'];
$cat_1=$_REQUEST['cat_1'];
$NROPAG=$_REQUEST['NROPAG'];
$PREV=$_REQUEST['PREV'];
$BASE=$_REQUEST['BASE'];
$SIGUIENTE=$_REQUEST['Siguiente'];
$ANTERIOR=$_REQUEST['Anterior'];
if ($NROPAG=='')$NROPAG=1;
if ($BASE=="") $BASE="www.deremate.com.ar";
if ($categoria=="") $categoria=$cat_1;
if ($cat_1==""){
$cat_1=$categoria;
if ($cat_1==""){
$cat_1="926";
$categoria="926";
}
}else{
$categoria=$cat_1;
}
$url="http://".$BASE."/categorias/xml/".$categoria.".xml";
if(!($Arquivo=@fopen($url,"r")))
{
exit;
}
while(!feof($Arquivo))
{
$xmls.=fgets($Arquivo,255);
}
fclose($Arquivo);
$Linha=utf8_decode ($xmls);
$Linha1=$Linha;
$inicio='NOM="';
$final='"';
$inicio_pos=strpos($Linha, $inicio)+strlen($inicio);
$final_pos=strpos($Linha, $final);
$length=$final_pos-$inicio_pos;
$Seleccion=substr($Linha,$inicio_pos, $length);
$inicio='IDC="';
$final='" NOM';
$inicio_pos=strpos($Linha, $inicio)+strlen($inicio);
$final_pos=strpos($Linha, $final);
$length=$final_pos-$inicio_pos;
$categoria=substr($Linha,$inicio_pos, $length);
$inicio="";
$final="";
if (stristr($Linha,$inicio)){
$inicio_pos=strpos($Linha, $inicio)+strlen($inicio);
$final_pos=strpos($Linha, $final);
$length=$final_pos-$inicio_pos;
$Linha=substr($Linha,$inicio_pos, $length);
$row=explode('';
$final='¶¶';
$inicio_pos=strpos($row[$b], $inicio)+strlen($inicio);
$final_pos=strpos($row[$b], $final);
$length=$final_pos-$inicio_pos;
$busca[$b]=substr($row[$b],$inicio_pos,$length)."# ";
$inicio='¶¶';
$final='';
$inicio_pos=strpos($row[$b], $inicio)+strlen($inicio);
$final_pos=strpos($row[$b], $final);
$length=$final_pos-$inicio_pos;
$busca[$b] .=substr($row[$b],$inicio_pos,$length)."# ";
$b=$b+1;
}while($row[$b]<>'');
};
$a=0;
$row=explode('SHOPPING solo en vivo