]+)>/i",$tags,$allTags,PREG_PATTERN_ORDER);
foreach ($allTags[1] as $tag){
if ($stripContent) {
$str = preg_replace("/<".$tag."[^>]*>.*<\/".$tag.">/iU","",$str);
}
$str = preg_replace("/<\/?".$tag."[^>]*>/iU","",$str);
}
return $str;
}
/*
placeOrder
CompanyProductIdentifier
Language
CreditOpinionCurrency
Country
getCompanyReport
OrderReference
MimeType
*/
require_once 'graydon/graydonws.php';
//placeOrder
$request = new StdClass();
$request->Authentication_Parameters = $authentication;
$request->OrderCreatorEmail = 'mricois@scores-decisions.com';
$request->CompanyProductIdentifier = $CompanyProductIdentifier;
$request->PartnerData = '';
$firephp->log($request,'requete');
try
{
$placeOrderResult = $graydon->placeOrder($request);
$firephp->log($placeOrderResult,'placeOrder');
}catch( SoapFault $exception ){
// Print the exception
print "\n Exception ";
var_dump($exception->detail);
}
?>
|
OrderStatus->OrderState == 'Completed'){
//getCompanyReport
$request = new StdClass();
$request->Authentication_Parameters = $authentication;
$request->LanguageCode = 'E'; //Spécifier la langue du rapport
$request->OrderReference = $placeOrderResult->OrderStatus->OrderReference;
$request->MimeType = 'html';
$firephp->log($request,'requete');
try
{
$reportResult = $graydon->getCompanyReport($request);
$firephp->log($reportResult,'reportResult');
$html = $reportResult->ReportText;
$html = str_replace('','',$html); //Suppression du titre
$html = preg_replace('@]*?>.*?@si', '', $html); //Suppression du titre
$html = preg_replace('@]*?>.*?@si', '', $html); //Suppression du titre
//$html = strip_selected_tags($html, 'head', true);
//Enregistrement du fichier xml
/*
$path = PATH_DATA.'/graydon';
$fileName = str_replace(':', '-', $identifier).'.xml';
$tabXML = (array)$reportResult->ReportXML;
$xml = $tabXML['any'];
file_put_contents($path.'/'.$fileName, $xml);
*/
}catch( SoapFault $exception ){
// Print the exception
print "\n Exception ";
var_dump($exception->detail);
}
/*
$dom = new DomDocument();
$dom->loadXML($xml);
$companyReport = $dom->getElementsByTagName('CompanyReport');
*/
?>
|
|
Aucune information disponible. |