Poder distinguir los distintos datos recibidos, separarlo, y poder llegarlo a guardar en una DB, pero se me imposibilita si no puedo siquiera imprimir bien la informacion.
Con respecto al xml2array.php
http://blog.unijimpe.net/xml2array-php-xml-parser/
Código PHP:
<?
header("Content-Type: text/html");
require("xml2array.php");
function imprimir_Array($result)
{
$local_archivo=file_get_contents("test.txt");
$x_archivo='test.txt';
$gestor=fopen($x_archivo, 'a+');
foreach($result as $x1 => $x2)
{
if(is_array($x2)){ imprimir_Array($x2); }
else
{
if(eregi($x2, $local_archivo)){ echo "<p>existe $x2</p>"; }
else{ echo "<p>no existe $x2</p>"; }
}
}
}
$contents = file_get_contents('http://argentina.dineromail.com/Vender/[email protected]&Acount=12624581&Pin=SPHVPISZNN&StartDate=20100301&EndDate=20100330&XML=1&ip=');
$result = xml2array($contents);
imprimir_Array($result);
?>
Código PHP:
<?
require("xml2array.php");
function imprimir_Array($result)
{
$cont=0;
foreach($result as $x1 => $x2)
{
if(is_array($x2)){ imprimir_Array($x2); }
else
{
echo "$cont - $x2 <br>";
}
$cont++;
}
}
$contents = file_get_contents('http://argentina.dineromail.com/Vender/[email protected]&Acount=12624581&Pin=SPHVPISZNN&StartDate=20100301&EndDate=20100329&XML=1&ip=');
$result = xml2array($contents);
imprimir_Array($result);
?>
Código PHP:
require("xml2array.php");
function imprimir_Array($result)
{
$x_archivo='test.txt';
$gestor=fopen($x_archivo, 'a+');
foreach($result as $x1 => $x2)
{
if(is_array($x2)){ imprimir_Array($x2); }
else
{
fwrite($gestor, "$x2 \r\n");
}
}
}
$contents = file_get_contents('http://argentina.dineromail.com/Vender/[email protected]&Acount=12624581&Pin=SPHVPISZNN&StartDate=20100301&EndDate=20100330&XML=1&ip=');
$result = xml2array($contents);
imprimir_Array($result);
# Contenido de la Cuenta 1-6 lineas
# 1er Cliente es Nro 6-19
# 13 Lineas por Cliente
$archivo=file("test.txt");
$Lineas_Total=count($archivo);
$Lineas_Restantes=($Lineas_Total-6);
$Total_Clientes=round($Lineas_Restantes / 12);
foreach ($archivo as $Fila){ $Fila=$archivo; }
echo ""
."El archivo contiene $Lineas_Total lineas<br><br>"
."Cantidad de Clientes: $Total_Clientes <br><br>"
;
foreach(range(6,$Lineas_Restantes, 13) as $z)
{
for($i=0;$i<=12;$i++)
{
$x=($z+$i);
$valor="";
if($i==0){ $valor="Fecha: "; }
if($i==2){ $valor="Correo: "; }
if($i==4){ $valor="Importe:"; }
if($i==0 OR $i==2 OR $i==4){ echo "$i $valor $Fila[$x] <br>"; }
}
echo "--------------------------------------------------<br>";
}