Can a PHP script be run from applescript

Hi,

Is it possible to run a PHP script from within an applescript? I have a script on a local linux network server that is launched from Flash on PC but on Mac it gives problems so I thought it may be possible to launch from applescript. First I figured out that it can be successfully launched from the terminal window by changing directory to the server then using /usr/bin/php sync.php

So i tried in an applescript that sits on the server in the same directory as the php file to use do shell script “/usr/bin/php sync.php” but it says it can’t find the sync.php. Ideally I’d also like to have the php script in a different directory (up one level).

Is it possible to do what I want either along the same lines as I’m trying or by some better method.

Thanks.

Take a look at this posting in Code Exchange.

Jon

Thanks Jon. Is it possible to use this without installing the PHP version you mention. It needs to work on standard OS X really.

Thanks.