I know this may not be the best place to post this sensing as it’s primarily an AppleScript community, but I’ve tried posting in a PHP community I frequent and didn’t have any luck.
I’m creating a vanity website hosted on my home computer, and one of the features I’m wanting to implement is having my current AIM status displayed. I’ve made an AppleScript that writes my iChat status to a text file. The only problem is, to update the text file, the script has to be run. After a good night’s sleep, I realized I should just try and have PHP tell the server to run the script when the page is loaded. (I could run a cron every 5 minutes, but that seems impractical for a page that will be viewed once every 3 or 4 hours.)
I’m not very command-line savvy, and I’ve never run a program on a server from a PHP script. I have a feeling there’s a simple solution to this.
if(!exec('/Library/Apache2/htdocs/functions/status.app')) {
echo('<br />The program wouldn't execute:');
}
I know I have the path right because if I type that exact same thing in the terminal, the script runs. I don’t think it’s permissions because they’re set to 777.
Is there anyone here who might be able to help?