login($OVHuser, $PWDuser, "fr", false); //Get Domains List $domainsList = $soap->domainList($session); foreach ($domainsList as $k => $v){ //Get Domains Info $domain = $soap->domainInfo($session, $v); $nbJours = nbJours($domain->expiration , date('Y-m-d')) * -1; //Check if domain expire in delay (defined) if (in_array($nbJours, $prevent)) echo "\033[31m"; //Create Body's mail $body = str_replace('%domain%', $v , $body_template); $body = str_replace('%nbJours%', $nbJours, $body); //Show Domain's Data echo resize($v, 25)." => ".resize($domain->expiration,10); //Get Owner's Data $owner = $soap->nicInfo($session,$domain->nicowner); echo resize($owner->name,25).resize($owner->email,25).resize("restant : ".$nbJours, 10)." Jours"."\n"; //prevent Owner if domain will expire if (in_array($nbJours, $prevent)){ mail($owner->email, $title, $body, "FROM: '$nom' <$email>\n"); echo "\033[0m"; } } //logout Ovh $soap->logout($session); } catch(SoapFault $fault) { echo $fault; } ?>