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
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]