Documentation
WC_PushMessageEx
Require: IP-Symcon >= 5.3
boolean WC_PushMessageEx (int $InstanceID, string $HookPath, string $Text, string $DestinationAddress, int $DestinationPort)
Parameters
InstanceID | ID des WebHook Control |
HookPath | Path of the hook |
Text | Message to send |
DestinationAddress | IP address to send to |
DestinationPort | Port to send to |
Returns
If the command succeeds, it returns TRUE, otherwise FALSE.
Description
Sends the message Message to a specific client on the hook HookPath of the WebHook Control with ID InstanceID. The client can be determined via the parameters of the IP address Target address and the target port Port.
Example
// Sends "Hello World back" to the "test" hook of the WebHook Control with ID 12345. In addition, the client with the address $_SERVER["REMOTE_ADDR"] and port $_SERVER["REMOTE_PORT"] is determined as the recipient.
WC_PushMessageEx(12345, "/hook/test", "Hello world back", $_SERVER["REMOTE_ADDR"], $_SERVER["REMOTE_PORT"]);