Results 1 to 6 of 6
Thread: PHP and TS Chat ?
-
23-02-2010, 14:07 #1
-= TeamSpeak Lover =-
- Join Date
- Jun 2005
- Location
- UK
- Posts
- 34
PHP and TS Chat ?
Does anyone have an example of how to use php to send text to a channel on TS ?
I want to link my websites Shout Box, so that anything people shout on the shout box, will get sent to TS into a specific channel.
And if possible , anything said in the channel sent to the shout box, that would require a plugin I know..
I hope some one has example code I could look at in php, and that some one can code a plugin to do this.
-
23-02-2010, 14:34 #2
This is also possible with a Teamspeak server bot. I could add this to my Teamspeak bot, that all messages are captured and send to a PHP script by POST.
I would prefer as command, example:
*Shoutbox* is the PHP script of your homepage.*Shoutbox*: User "Homepage_XYZ" wrote:
Hello, message, longer message, ...
*TS_XYZ*: !send Answer message, ...
*TS Bot*: Message successfully sent...
*TS_XYZ* is an user on your Teamspeak server.
*TS Bot* is a Teamspeak server bot which has this command.
Just answer me if you are interested and you are able to run a Teamspeak bot. But I need some days to add this, my ToDo is long
.
With your PHP script just send the following telnet commands and it will show like in the example above:
Code:use port={virtualserver port} login {loginname} {password} clientupdate client_nickname=Shoutbox whoami clientmove clid={client_id from whoami} cid={channelID to send the message to} sendtextmessage targetmode=2 msg=User\s"Homepage_XYZ"\swrote:\nHello,\smessage,\slonger\smessage,\s...
-
23-02-2010, 23:40 #3
-= TeamSpeak Lover =-
- Join Date
- Jun 2005
- Location
- UK
- Posts
- 34
I tried using fsock to connect to the server but it failed to connect :S
At the moment I just want a simply php script that will have an edit box and a send button and anything typed into the box and sent will appear on TS.
if some one could do that and list the code I would be very appreciative.
-
24-02-2010, 11:56 #4
You can use this:
http://forum.teamspeak.com/showthread.php?t=46905
http://forum.teamspeak.com/showthread.php?t=48162
Or you can use my simple class which I use on my homepage (I just removed the database queries for the TS3 server login and address).
http://server.german-fighters.com/mu...leTSTelnet.zip
-
28-02-2010, 00:10 #5
-= TeamSpeak Lover =-
- Join Date
- Jun 2005
- Location
- UK
- Posts
- 34
Hay m8, I am trying to use your code.
I changed the IP and Port in the top function TSconnect to our server. and then added the following code.
Few things, first of all the connection fails and times out, and second what do I need for TScommand to send $msg into the guild chat tab ?Code:$Session = new SimpleTSTelnet(); if ($Session->TSconnect()){ $Session->TSLogin("WebSite"); $msg=$Session->convertText2TS($msg); //$Session->???? - Send $msg to guild chat tab ?? $Session->Disconnect(); } else { echo "Failed to send message"; }
not sure but my server might not support fsock not sure how to test this tho.
-
28-02-2010, 00:47 #6
After connecting and login with my class, you have to do the following commands:
Code:whoami clientmove clid={client_id from whoami} cid={channelID to send the message to} sendtextmessage targetmode=2 msg=User\s"Homepage_XYZ"\swrote:\nHello,\smessage,\slonger\smessage,\s...
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)


Reply With Quote




