Ok thank you anyways !There is a barley no chance that this will ever come, because twich integration is related to other Tea*Speak services and not only to the server
<?php
require_once("../libraries/TeamSpeak3/TeamSpeak3.php");
$ts3_ServerInstance = TeamSpeak3::factory("serverquery://serveradmin:password@serverip:queryport/?server_port=serverport");
$streamer = 'Test123';
function is_channel_live($channel) {
$request = json_decode(@file_get_contents( 'https://api.twitch.tv/kraken/streams/' . $channel ));
return ( ! is_null( $request->stream ) ) ? TRUE : FALSE;
}
if(is_channel_live($streamer))
foreach($ts3_ServerInstance->clientList() as $ts3_Client)
{
$ts3_Client->message("[URL]https://www.twitch.tv/$channel[/URL] is streaming blablabla");
}
else
echo "Is not streaming";
?>
I think most of the people asking around for the TeamSpeak Twitch integration to be added to TeaSpeak are asking for it because of its "auto-assignment to group" feature which adds users to groups based on viewers, subscribers, VIPs, moderators and streamers groups on Twitch.You can do this kind of script, a quick example.
you must create an application on the twitch API with the link of your script, and create a cron job to send a message to the users when a stream is launched..
PHP:<?php require_once("../libraries/TeamSpeak3/TeamSpeak3.php"); $ts3_ServerInstance = TeamSpeak3::factory("serverquery://serveradmin:password@serverip:queryport/?server_port=serverport"); $streamer = 'Test123'; function is_channel_live($channel) { $request = json_decode(@file_get_contents( 'https://api.twitch.tv/kraken/streams/' . $channel )); return ( ! is_null( $request->stream ) ) ? TRUE : FALSE; } if(is_channel_live($streamer)) foreach($ts3_ServerInstance->clientList() as $ts3_Client) { $ts3_Client->message("[URL]https://www.twitch.tv/$channel[/URL] is streaming blablabla"); } else echo "Is not streaming"; ?>
I did not test, I do not have a Twitch account