I want to call an external php script with applescript and alfred. Currently I open the Safari with the url to the php script. This is very annoying. Is there a way to call the php script without open the Safari?
Best regards, emha
I want to call an external php script with applescript and alfred. Currently I open the Safari with the url to the php script. This is very annoying. Is there a way to call the php script without open the Safari?
Best regards, emha
PHP scripts / commands can be ran from a standard shell prompt:
do shell script "php -q " & quoted form of posix path of phpScriptPath
Source: here
EDIT:
You can use cURL from the shell, and dump the output. This is kind of like just pinging your script, which I'm guessing is what you want to do. Just replace http://www.google.com
with the path to your script. And if you omit >/dev/null 2>&1
, you can get cURL's output. This is nice because you can add flags to curl to show headers, do post / get, etc.
do shell script "curl http://www.google.com >/dev/null 2>&1"