Plugin samples

Calling PHP scripts

This plugin demonstrates calling PHP script and collecting its output. This allows leveraging functionality of various PHP projects for your plugin.

function TestPHP(Sender) {
    if (CheckIsPhpAvailable()) {
        var s = "";
        if (ExecutePhpScript("", Script.Path + "test.php", "", s)) {
            Script.Message("php script output: " + s);
        } else {
            Script.Message("php script failed");
        }
    }
}

//some test actions for toggling docks
Script.RegisterAction("", "Call Sample PHP Script", "", &TestPHP);


test.php

<?php

echo "Hello!";

?>