1,
'soap_version' => SOAP_1_1,
'location' => WEBSERVICE_URL,
'uri' => WEBSERVICE_URI,
'login' => $_SESSION['tabInfo']['login'],
'password' => $_SESSION['tabInfo']['password'],
// 'encoding' => 'UTF-8'
));
//raisonSociale adresse codePostal Ville Siege actif deb nbRep maxRep Pertinence AvecSIREN naf
try {
$O = $client->searchMandataires($q,
array('V', 'N', 'H', 'A', 'M'), $filtre); //types de mandataires
$tableResults = array();
$tableResults = $O['result'];
}catch (SoapFault $fault){
echo 'Erreur durant la recherche';
exit;
}
$return = "A l'adresse du bien vendu";
$return.= $separator;
$return.= "adresse";
$return.= "\n";
/*
REGEX Code Postal : ^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$
(?0 ){
$i=0;
foreach ($tableResults as $code=>$lib){
$tabResults[$i]['code'] = $code;
$tabResults[$i]['lib'] = htmlspecialchars_decode(
html_entity_decode($lib), ENT_QUOTES);
preg_match('/(? $row){
$code[$key] = $row['code'];
$lib[$key] = $row['lib'];
$cp[$key] = $row['cp'];
}
//Classement du tableau
array_multisort($cp, SORT_NUMERIC, $tabResults);
$firephp->log($tabResults,'tabResults');
//Affichage des valeurs
foreach ($tabResults as $item){
$return.= $item['lib'];
$return.= $separator;
$return.= $item['code'];
$return.= "\n";
//Send String|Id for the autocompleter
}
}
echo $return;