SBSL Example: Group chat to URL forwarder
Forwards all group chat to your web script (for example, written in PHP). Your script may send replies to the chat.
group_im { # Check if this is a group we are interested in if $group_name==My test group http_query http://www.testurl.com/script.php send_group_im $group_uuid $httpreply endif }
Comments
This script works in the following way:
- Checks if group chat message came from "My test group" group
- Forwards it to "http://www.testurl.com/script.php" (probably your web PHP script)
- Waits for reply from script
- Says the script response back to group chat
Return back to SBSL examples
Category: SBSL