do shell script (remote)

Is it possible to do shell scripting remotely?

I am creating an app that uses some shell scripts to store/retrieve data from a mysql database.
I want to use this app on several different machines and target a server that has mysql, is it possible to use an ip or something to shell script remotely?

something like:

set rows to paragraphs of (do shell script "127.0.0.1 /usr/local/php/bin/php -f  getJobs.php")

I imagine this is a common thing, using a database with an application. How does one go about it with applescript?
do shell script works fine if the database is on the machine running the app, but problematic when the app is running on another machine

you could setup RSH or SSH to the remote machine to execute the command as in:

do shell script “rsh ”

or the more secure

do shell script “ssh user@remote-ip

Might be possible to enable the web server on the remote machine and have Apache PHP return the content as text/plain and retrieve the data using curl.

set rows to paragraphs of (do shell script "curl [url=http://192.188.1.1/getJobs.php)]http://192.188.1.1/getJobs.php")[/url]

Thanks THEM
That is what i ended up doing

But, how to store data through applescript to the database remotely?