Modification chemin de stockage fichier xml (creditsafe), issue #0000290
This commit is contained in:
parent
60bbb79168
commit
688b3469f7
@ -49,7 +49,7 @@ $req='<xmlrequest>'.
|
||||
$date=date('Ymd');
|
||||
$fichier=$siret.'-'.$date.'.xml';
|
||||
|
||||
if ( !file_exists(PATH_DATA.'/creditsafe/xml/'.$fichier) )
|
||||
if ( !file_exists(PATH_SITE.'/creditsafe/'.$fichier) )
|
||||
{
|
||||
$url='https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
|
||||
$referer=$cookie='';
|
||||
@ -57,19 +57,19 @@ $req='<xmlrequest>'.
|
||||
$referer=$url;
|
||||
$xml = html_entity_decode($page['body'], ENT_QUOTES, 'UTF-8');
|
||||
/** Enregistrement du fichier XML en provenance des greffes **/
|
||||
$fp=@fopen(PATH_DATA.'/creditsafe/xml/'.$fichier, 'w');
|
||||
$fp=@fopen(PATH_SITE.'/creditsafe/'.$fichier, 'w');
|
||||
@fwrite($fp, $xml);
|
||||
@fclose($fp);
|
||||
$O = $client->setLog('scorecsf', $siret);
|
||||
} else {
|
||||
/** Lecture du fichier XML en provenance des greffes **/
|
||||
$xml = file_get_contents(PATH_DATA.'/creditsafe/xml/'.$fichier);
|
||||
$xml = file_get_contents(PATH_SITE.'/creditsafe/'.$fichier);
|
||||
$O = $client->setLog('scorecsf', $siret, 0, 'local');
|
||||
}
|
||||
|
||||
$dom_object = new DomDocument2();
|
||||
//TODO : Chemin !!
|
||||
$dom_object->load(PATH_DATA.'/creditsafe/xml/'.$fichier);
|
||||
$dom_object->load(PATH_SITE.'/creditsafe/'.$fichier);
|
||||
$companyname=$dom_object->getValueFromTag('companyname');
|
||||
$rating=$dom_object->getValueFromTag('rating');
|
||||
$ratingdesc1=str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc1'));
|
||||
|
Loading…
Reference in New Issue
Block a user