I used below codes for restart centos Server.
exec("reboot -h now");
and
shell_exec("reboot -h now");