#!/usr/bin/php enabled=1; $dom->lock(); // And we process the database changes : $db->query("SELECT * FROM domaines;"); $domains=array(); while ($db->next_record()) { $domains[]=array("dom"=>$db->Record["domaine"],"gesmx"=>$db->Record["gesmx"],"mx"=>$db->Record["mx"]); } foreach($domains as $v) { if ($v["gesmx"]) { $dom->alternc_add_mx_domain($v["dom"]); } else { $dom->set_sub_domain($v["dom"],"","mx",$v["mx"]); } } $dom->unlock(); ?>