Prev |  | Next

### 3.2.3. external

The external hook functions are never called from any of the standard Phorum pages. These functions are called by invoking `script.php` on the command line with the `--module` parameter. This can be used to pipe output from some arbitrary command to a specific module, which can do something with that input. If your module does not need any command line input and is meant to be run on a regular basis, you should consider using the ??? hook.
Mind that for using an ??? hook, the module in which it is handled must be enabled in your admin interface. So if an ??? hook is not running, the containing module might be disabled.
To run this hook from the command line, you have to be in the Phorum installation directory. So running the ??? hook of a module named `external_foo` would be done like this on a UNIX system prompt:

    # cd /your/phorum/dir
    # php ./script.php --module=external_foo

For easy use, you can of course put these commands in a script file.

Call time:

In the `script.php` when called from the command prompt or a script file.

Hook input:

Any array of arguments. (Optional)

Hook output:

Same as input.

Prev | Up | Next
| Home |