partGetSession();
$this->partConnection();
}
function __destruct() {
$this->partSaveSession();
}
function getInfosDisponbiles($siren) {
$this->siren=$siren;
$this->partConnection();
return $this->partVitrine(true);
}
private function partConnection() {
if (!$this->wrncsrv2 || time()>$this->timeOut) {
$this->timeOut=time()+900;
$this->url=$this->urlRacine.'/index.ow';
$page=getUrl($this->url, '', '', $this->urlRacine, false, 'www.euridile.com');
$this->referer=$this->url;
$this->body=$page['body'];
$this->codeRetour=$page['code'];
$this->header=$page['header'];
//echo date('Y/m/d - H:i:s') ." - Initialisation URL = $this->url (Code retour = $this->codeRetour)
".EOL;
$fp=fopen('./euridile_connexion1.log', 'w');
fwrite($fp,print_r($page,true));
fclose($fp);
if (preg_match('//i', $this->body, $matches))
$this->url=$this->urlRacine.'/'.$matches[1];
else debugLog('E',"Erreur de communication - Redirection impossible sur ".$this->url,__LINE__,__FILE__,__FUNCTION__,__CLASS__);
debugLog('I','Redirection trouv�e sur la page '.$this->url,__LINE__,__FILE__,__FUNCTION__,__CLASS__);
if (preg_match('/\.ow\?WRNCSRV2=(.*)$/i', $matches[1], $matches)) {
$this->wrncsrv2=$matches[1];
debugLog('I','Session partenaire WRNCSRV2='.$this->wrncsrv2,__LINE__,__FILE__,__FUNCTION__,__CLASS__);
}
else debugLog('E','Impossible d\'identifier le num�ro de session partenaire',__LINE__,__FILE__,__FUNCTION__,__CLASS__);
$page=getUrl($this->url, '', '',$this->referer, false, 'www.euridile.com');
$this->referer=$this->url;
$this->body=$page['body'];
$this->codeRetour=$page['code'];
$this->header=$page['header'];
debugLog('D',"Page d'accueil URL = $this->url (Code retour = $this->codeRetour)",__LINE__,__FILE__,__FUNCTION__,__CLASS__);
$fp=fopen('./euridile_connexion2.log', 'w');
fwrite($fp,print_r($page,true));
fclose($fp);
if (preg_match('/