<?php
$ctrl1 = array("oid" => "1.2.752.58.10.1", "iscritical" => true);
$ctrl2 = array("oid" => "1.2.752.58.1.10", "value" => "magic");
if (!ldap_set_option($ds, LDAP_OPT_SERVER_CONTROLS, array($ctrl1, $ctrl2))) {
echo "Failed to set server controls";
}
?>