I am a beginner, so please be understanding. I want to create commands in mattermost “ping”, “whois” and “ps”. I have no idea how to adapt my file to work with the mattermost.
I have something like that.
<?php
$json = file_get_contents('php://input');
$update = json_decode($content, true);
//CMD
switch ($text):
case "/whois":
$status = "$text,0";
file_put_contents($file, $status);
$msg = "Enter the domain to search";
break;
case "/ping":
$status = "$text,0";
file_put_contents($file, $status);
$msg = "enter the IP address";
break;
case "/ps":
$status = "$text,0";
file_put_contents($file, $status);
$msg = "enter the text";
break;
endswitch;
?>
Can I count on any tips?