Access ENC28J60 etherShield Outside Home Network

The action in your is called by the browser. It will work if the browser can access it (true from the local network only). Since you are using functions from the etherShield library you may be able to retrieve the address of the browser that is sending the request. Then, if it starts with 192.168 you know it's from the local network.

Once you know that, it is easy to change the value of your action so that it reflects the local / public address.

If you cannot get the remote address, your only option is to define different URLs for local and remote clients (e.g. http://192.168.1.15/local, http://your.public.ip/remote). You won't need to define two different pages, just parse the request to differentiate the value of the action.