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');
|
$date=date('Ymd');
|
||||||
$fichier=$siret.'-'.$date.'.xml';
|
$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;
|
$url='https://www.creditsafe.fr/getdata/service/CSFRServices.asmx/GetData?RequestXmlStr='.$req;
|
||||||
$referer=$cookie='';
|
$referer=$cookie='';
|
||||||
@ -57,19 +57,19 @@ $req='<xmlrequest>'.
|
|||||||
$referer=$url;
|
$referer=$url;
|
||||||
$xml = html_entity_decode($page['body'], ENT_QUOTES, 'UTF-8');
|
$xml = html_entity_decode($page['body'], ENT_QUOTES, 'UTF-8');
|
||||||
/** Enregistrement du fichier XML en provenance des greffes **/
|
/** 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);
|
@fwrite($fp, $xml);
|
||||||
@fclose($fp);
|
@fclose($fp);
|
||||||
$O = $client->setLog('scorecsf', $siret);
|
$O = $client->setLog('scorecsf', $siret);
|
||||||
} else {
|
} else {
|
||||||
/** Lecture du fichier XML en provenance des greffes **/
|
/** 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');
|
$O = $client->setLog('scorecsf', $siret, 0, 'local');
|
||||||
}
|
}
|
||||||
|
|
||||||
$dom_object = new DomDocument2();
|
$dom_object = new DomDocument2();
|
||||||
//TODO : Chemin !!
|
//TODO : Chemin !!
|
||||||
$dom_object->load(PATH_DATA.'/creditsafe/xml/'.$fichier);
|
$dom_object->load(PATH_SITE.'/creditsafe/'.$fichier);
|
||||||
$companyname=$dom_object->getValueFromTag('companyname');
|
$companyname=$dom_object->getValueFromTag('companyname');
|
||||||
$rating=$dom_object->getValueFromTag('rating');
|
$rating=$dom_object->getValueFromTag('rating');
|
||||||
$ratingdesc1=str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc1'));
|
$ratingdesc1=str_replace('?',"'",$dom_object->getValueFromTag('ratingdesc1'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user