I need to split words after equals (=), output is following:
servercreate virtualserver_port=5383 virtualserver_maxclients=5
sid=43 token=hXy4fvF54hMgcZTJkf6f1JcPpvkURMDiOIJ9ERqN virtualserver_port=5383
error id=0 msg=ok
I need this sid=NUMBER and token=hXy4... to split in php and store in mysql.
I tried myself to split with:
$sid = split("sid=", $data);
$token = split("token=", $sid[1]);
fclose($stream);
$data1 = ["0" => "$sid[0]", "1" => "$token[1]"];
return $data1;
but as return I receive this:
TS3
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
Basically there is three commands running in php with ssh2 function, first it was "telnet IP PORT" and output for that is:
TS3
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
Next command is "login ..." output is:
error id=0 msg=ok
and latest one is ""servercreate ..." and output is sid=... token=...