Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/07/2011, 07:06
totolia
 
Fecha de Ingreso: mayo-2008
Mensajes: 315
Antigüedad: 16 años
Puntos: 7
Problema PHP y XML

Pues estoy haciendo un código que extrae en bbcode de un foro SMF las imágenes, para crear un XML que lo utilizo para un rotador de imágenes.

El problema es que me marca un error el XML que no consigo descubrir que es.

ERROR:
Código:
This page contains the following errors:

error on line 34 at column 98: EntityRef: expecting ';'
Below is a rendering of the page up to the first error.
CODIGO PHP:
Código PHP:
<?php
header
("Content-Type: text/xml");
$slides "";
function 
effect(){
srand((double)microtime()*1234567);
$effects = array(
'num="3" slicing="vertical" direction="down" cube_color="0xFFFFFF"',
'num="4" direction="right" shader="flat" cube_color="0xFFFFFF"',
'num="6" slicing="vertical" direction="up" shader="flat" delay="0.05" z_multiplier="4" cube_color="0xFFFFFF"',
'num="4" direction="right" shader="phong" cube_color="0xFFFFFF"');
return 
$effects[mt_rand(0,count($effects)-1)];
}
require(
"Settings.php");
$conexion mysql_connect($db_server$db_user$db_passwd);
mysql_select_db($db_name $conexion);

$post2 mysql_query("SELECT * FROM smf_topics WHERE id_board='1'  ORDER BY id_topic DESC LIMIT 5");
    while (
$totolia2 mysql_fetch_array($post2)) {
$id $totolia2['id_topic'];
$post mysql_query("SELECT * FROM smf_messages WHERE id_topic='" $id "' ORDER BY id_msg DESC");
    while (
$totolia mysql_fetch_array($post)) {

$body22 $totolia['body'];
$title $totolia['subject'];
$contenido1 $totolia['body'];
$contenido substr($contenido1030);


$parser "|\[img\](.*?)\[/img\]|is";
$elpost "";
if (
preg_match($parser$body22$video1)){ 
    
$elpost $video1[1];


if (
$elpost == $body22 || $elpost == "IMAGEN PARA LA PORTADA" || $elpost == ""){
$slides.= '<slide></slide>';
} else {
// Cogiendo valor fuente
$slides.= '<slide><url>thumb.php?ruta='.$elpost.'&ancho=500</url><link target="_self">index.php?topic='.$id.'</link><description><link target="_self">index.php?topic='.$id.'</link><heading>'.$title.'</heading><paragraph>'.$contenido.' [...]</paragraph></description></slide><transition '.effect().' />'."\n";
}
}
}
}


echo(
'<?xml version="1.0" encoding="utf-8" ?>
<cu3er>
     <settings>
    
          <auto_play>
          <defaults symbol="circular" time="3" />
          <tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
          <tweenOut tint="0xFFFFFF"/>
          </auto_play>          
    
         <prev_button>
               <defaults round_corners="5,5,5,5"/>
               <tweenOver tint="0xFFFFFF" scaleX="1.1" scaleY="1.1"/>
               <tweenOut tint="0x000000" />
          </prev_button>
          
         <prev_symbol>
               <tweenOver tint="0x000000" />               
          </prev_symbol>
          
         <next_button>
               <defaults round_corners="5,5,5,5"/>               
               <tweenOver tint="0xFFFFFF"  scaleX="1.1" scaleY="1.1"/>
               <tweenOut tint="0x000000" />
          </next_button>
          
         <next_symbol>
               <tweenOver tint="0x000000" />
          </next_symbol>     
               
     </settings>    

     <slides>
'
.$slides.'                    
     </slides>
</cu3er>'
);
    
?>

Alguna idea chicos? Gracias ;)