It may be possible with AppleScript and HTTP (or file sharing), but maybe not due to Classic AppleScript's limitations. All you would have to do is update a .txt file on an http server (or something else simple) with a signal for the AppleScript to detect and act upon. I suppose you could do it easily by editing a file locally on the Mac, with remote file sharing turned on.
The script would work this way:
1. AppleScript reaches the end of a timer, triggers subfunction 1a.
1a. Subfunction downloads the contents of a plaintext file or web page.
2. The contents of the plaintext are parsed and checked for a signal. (IE: "1" or "poweroff") If no signal is found, it ends the main script and resets the looping timer.
2a. Upon detection of the signal, it sends shut down command to Finder.
You may need to make use of 2 scripts in order to get it to run smoothly. Having a single script constantly looping (timer or not) can get very unstable and it will eventually crash. So, you could simply run a timer Daemon that ends itself and activates the main parsing script, which then activates the timer Daemon upon ending itself as well.