array( 'hostnameOvh' => 'ns111111.ovh.net', 'ip' => '1.1.1.1', ), 'srv2' => array( 'hostnameOvh' => 'ns222222.ovh.net', 'ip' => '2.2.2.2', ), ); if ( ! ($identifiants = parse_ini_file('.auth-api-ovh.ini'))) { echo "ERREUR : Impossible de récupérer les identifiants de connexion à l'API OVH.\n"; exit(1); } try { $soap = new SoapClient("https://www.ovh.com/soapi/soapi-re-1.59.wsdl"); //login $session = $soap->login($identifiants['login'], $identifiants['password'],"fr", false); echo "login successfull\n"; //dedicatedFailoverRipeList foreach ($listeServeurs as $key => $server) { $result = $soap->dedicatedFailoverList($session, $server['hostnameOvh']); echo "$key : "; print_r($result); } //logout $soap->logout($session); echo "logout successfull\n"; } catch(SoapFault $fault) { echo $fault; exit(1); } // Code de retour Ok exit(0);