Chenzo
21-02-2007, 19:58
Hello... I'm planning on writing a custom app to display my TS info on my website...
I wrote (found/copied) this little simple PHP script to start to make sure my stuff's set right...
<?php
global $errno, $errstr;
$host = "70.84.170.226";
$port = "51234";
$timeout = "36";
$socket = fsockopen($host, $port, $errno, $errstr, $timeout);
if(!$socket or fread($socket, 4) != "[TS]")
{
echo("Teamspeak is <b>not</b> running.");
}
else
{
echo("Teamspeak is <b>running</b>.<p>");
}
fputs($socket, "quit");
fclose($socket);
?>
and I set BOTH my WebPost Post and Link URLs to point directly at that file.
Nothing seems to be happening... the script just times out. I don't even get the "is not running" error...
am I missing something here? any help would be appreciated. Thanks
I wrote (found/copied) this little simple PHP script to start to make sure my stuff's set right...
<?php
global $errno, $errstr;
$host = "70.84.170.226";
$port = "51234";
$timeout = "36";
$socket = fsockopen($host, $port, $errno, $errstr, $timeout);
if(!$socket or fread($socket, 4) != "[TS]")
{
echo("Teamspeak is <b>not</b> running.");
}
else
{
echo("Teamspeak is <b>running</b>.<p>");
}
fputs($socket, "quit");
fclose($socket);
?>
and I set BOTH my WebPost Post and Link URLs to point directly at that file.
Nothing seems to be happening... the script just times out. I don't even get the "is not running" error...
am I missing something here? any help would be appreciated. Thanks