You can turn off the server computer, sure. Just use the
exec function to execute the shutdown command for your OS. (The exact command varies between OSs).
For example, for a Linux server, you could do:
This, obviously, requires that PHP (or Apache, if PHP is run as an Apache module) is run by a user that is allowed to use that command. If not, you will not be able to do this.
If you are trying to shut down the computer's of a client (website visitor) then no, you can not. It's just basic security.