Ajout debug
This commit is contained in:
parent
8607afc479
commit
1db6868a07
@ -51,7 +51,6 @@ else
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids);
|
GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -89,45 +88,50 @@ function GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids)
|
|||||||
$out .= "Host: $host\r\n";
|
$out .= "Host: $host\r\n";
|
||||||
$out .= "Connection: Close\r\n\r\n";
|
$out .= "Connection: Close\r\n\r\n";
|
||||||
|
|
||||||
fwrite($fp, $out);
|
if (fwrite($fp, $out) )
|
||||||
|
|
||||||
while (!feof($fp))
|
|
||||||
{
|
{
|
||||||
$line = fgets($fp, 1024);
|
while (!feof($fp))
|
||||||
|
{
|
||||||
if (preg_match("/<Preselection .* \/>/",$line))
|
$line = fgets($fp, 1024);
|
||||||
{
|
|
||||||
$results = split(" ",trim($line));
|
|
||||||
//print_r($results);
|
|
||||||
|
|
||||||
$array = array();
|
if (preg_match("/<Preselection .* \/>/",$line))
|
||||||
preg_match('/telnum="([0123456789]*)"/', $line, $array);
|
{
|
||||||
$ligne_numero = $array[1];
|
$results = split(" ",trim($line));
|
||||||
|
//print_r($results);
|
||||||
|
|
||||||
|
$array = array();
|
||||||
|
preg_match('/telnum="([0123456789]*)"/', $line, $array);
|
||||||
|
$ligne_numero = $array[1];
|
||||||
|
|
||||||
|
$array = array();
|
||||||
|
preg_match('/Service_Statut="([\S]*)"/i', $line, $array);
|
||||||
|
$ligne_service = $array[1];
|
||||||
|
|
||||||
|
$array = array();
|
||||||
|
preg_match('/PreSelection_Statut="([\S]*)"/i', $line, $array);
|
||||||
|
$ligne_presel = $array[1];
|
||||||
|
|
||||||
|
print "$i/$numcli ";
|
||||||
|
print $ligne_numero." ";
|
||||||
|
print substr($ligne_service.str_repeat(" ",20),0,20);
|
||||||
|
print substr($ligne_presel.str_repeat(" ",20),0,20);
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
|
||||||
$array = array();
|
if (preg_match("/<Error .* \/>/",$line))
|
||||||
preg_match('/Service_Statut="([\S]*)"/i', $line, $array);
|
{
|
||||||
$ligne_service = $array[1];
|
$array = array();
|
||||||
|
preg_match('/libelle="(.*)" xmlns:d4p1/', $line, $array);
|
||||||
$array = array();
|
|
||||||
preg_match('/PreSelection_Statut="([\S]*)"/i', $line, $array);
|
print "$i/$numcli ";
|
||||||
$ligne_presel = $array[1];
|
print "$cli ErreurAPI ".$array[1]."\n";
|
||||||
|
}
|
||||||
print "$i/$numcli ";
|
|
||||||
print $ligne_numero." ";
|
|
||||||
print substr($ligne_service.str_repeat(" ",20),0,20);
|
|
||||||
print substr($ligne_presel.str_repeat(" ",20),0,20);
|
|
||||||
print "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (preg_match("/<Error .* \/>/",$line))
|
|
||||||
{
|
|
||||||
$array = array();
|
|
||||||
preg_match('/libelle="(.*)" xmlns:d4p1/', $line, $array);
|
|
||||||
|
|
||||||
print "$i/$numcli ";
|
|
||||||
print "$cli ErreurAPI ".$array[1]."\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Impossible d'ecrire sur la socket";
|
||||||
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user