echo "";
$path="/home/sepomo/public_html/sepomochat/ficheros";
$lineas=file($path."/".$file.".chat");
$n=0;
if (!$nmsg) $nmsg=10;
if (!$separador) $separador=" |:| ";
foreach($lineas as $linea)
{
$array=explode("\n",$linea);
if ($array[0])
{
if (substr($array[0],0,6) == "ViP:->")
{
$matriz[$n]=$separador."[VIP] ".substr($array[0],6);
}
else
{
$matriz[$n]=$separador.$array[0];
}
$n++;
}
}
$y=0;
for ($x=$n-1;$x>=0;$x--)
{
$matriz2[$y]=$matriz[$x];
$y++;
}
for ($i=0;$i<$nmsg;$i++)
{
$resultado.=$matriz[$i];
}
/*
foreach($matriz2 as $linea)
{
$resultado.=$linea;
}
*/
echo "";
?>