-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need help #1
Comments
Hey @malitha22, It looks like DNS isn't working properly on your machine if you typed the name of your TS3 server inside the $server_ip = "127.0.0.1"; Did you tried to put the IP address of your TS3 server instead? |
yes! I tried 127.0.0.1/localhost/ts3ip/domain |
but it didnt work |
The problem is that the API can't connect to your TS3 Server Query.
You can check if your server query accepts TCP connections with this small program: <?php
$host = "YOUR TS3 SERVER IP";
$port = 10011;
$waitTimeoutInSeconds = 1;
if($fp = fsockopen($host,$port,$errCode,$errStr,$waitTimeoutInSeconds)){
echo("Online"); // Can create a connection
} else {
echo("Offline"); // Can't create a connection
}
fclose($fp);
?> |
@dennisabrams its online! |
@dennisabrams I tried with different vps and teamspeak servers but didnt work! |
<?php
require_once("libraries/TeamSpeak3/TeamSpeak3.php"); // Your TS3 PHP framework path
$serverquery_username = "serveradmin";
$serverquery_password = "PASSWORD";
$server_ip = "127.0.0.1";
$serverquery_port = "10011";
$server_port = "9987";
try
{
$conn = "serverquery://$serverquery_username:$serverquery_password@$server_ip:$serverquery_port/?server_port=$server_port";
$ts3_VirtualServer = TeamSpeak3::factory($conn);
echo($ts3_VirtualServer);
}
catch(TeamSpeak3_Exception $e)
{
echo "Error Code:" . $e->getCode() . ": " . $e->getMessage();
}
?>
So if you tried this and it still fails, check the Teamspeak 3 PHP Framework Docs and the informations & requirements inside the README.md.
|
thankyou so much! , the problem was the serverquery password its start with "@" |
No problem, I'm glad I could help 😊. I will add this problem to the |
Special characters can be used inside the serverquery username & password now.
|
Error Code: 0 php_network_getaddresses: getaddrinfo failed: Name or service not known
need help with this!
thanks
The text was updated successfully, but these errors were encountered: