Unless you create an RMI, than the applet would only work on the client loading it. Applets are Client side executed as opposed to PHP which is Server side. You also need to sign the applet if you intend to act with privilege on the remote machine. The applet is like HTML is to the browser.
So yes, you can use the applet on the client, but no you cannot connect remotely to it directly like that.