I have a Question !♥

Joined
Mar 20, 2016
Messages
39
Reaction score
4
Points
43
Location
in The World :)
Get IP.
PHP:
    function getClientIp() {
        if (!empty($_SERVER['HTTP_CLIENT_IP']))
            return $_SERVER['HTTP_CLIENT_IP'];
        else if(!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
            return $_SERVER['HTTP_X_FORWARDED_FOR'];
        else if(!empty($_SERVER['HTTP_X_FORWARDED']))
            return $_SERVER['HTTP_X_FORWARDED'];
        else if(!empty($_SERVER['HTTP_FORWARDED_FOR']))
            return $_SERVER['HTTP_FORWARDED_FOR'];
        else if(!empty($_SERVER['HTTP_FORWARDED']))
            return $_SERVER['HTTP_FORWARDED'];
        else if(!empty($_SERVER['REMOTE_ADDR']))
            return $_SERVER['REMOTE_ADDR'];
        else
            return false;
    }
Get UID:
PHP:
    $connect = "serverquery://".$USER_QUERY.":".$PASS_QUERY."@".$HOST_QUERY.":".$PORT_QUERY."/?server_port=".$SERVER_PORT."";
    $ts3 = TeamSpeak3::factory($connect);
    $FLAG = false;
  
    foreach ($ts3->clientList(array('client_type' => '0', 'connection_client_ip' => getClientIp())) as $client) {
        $clientuid = $client->client_unique_identifier;
        $client_nickname = $client->client_nickname;
        $client_clid = $client->clid;
        $FLAG = true;
        break;
    }
    if (!$FLAG){
        echo "<p><b>You are not conected To TS3 SErver.</b></p><br/>";
        header("refresh: 10; url = ./");
        die;
    }
sorry i have a problem
http://prntscr.com/bqxjya
I am inside In Teamspeak3
 

ARABHOST

Member
Joined
Jul 11, 2016
Messages
15
Reaction score
2
Points
38
Age
18
PHP:
<?php
        //framework
        require_once("libraries/TeamSpeak3/TeamSpeak3.php");
        session_start();
        $IDChannel = $_POST['name'];
        $resume_time = time();
        $result = array();
        $verfied = "0";
        try {
                $ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]_ip:10011/?server_port=9987&nickname=botname");
                foreach ($ts3_VirtualServer->clientList() as $cl) {
                                        if ($cl->getProperty('connection_client_ip') == $_SERVER['REMOTE_ADDR']) {
                                                $result[] = $cl->client_nickname;
                                                $client_info = $cl;
                                                $verfied++;
                                                $unid = $client_info["client_unique_identifier"];
                $_SESSION['client_uid'] = $unid;
        $client_uid = $unid;
        $_SESSION['client_db'] = $client["client_database_id"];
                                }
                        }
                }     
                catch (Exception $e) {
                        echo '<div style="background-color:red; color:white; display:block; font-weight:bold;">QueryError: ' . $e->getCode() . ' ' . $e->getMessage() . '</div>';
                        die;
                        }
                if($verfied == "0"){
                //not in ts
                echo "<div id='error'>";
                echo "You are not in Teamspeak Server.";
                echo "<a href='ts3server://185.11.146.141/?port=9987&nickname=WebGuest'>Join our TeamSpeak Server Here</a>";
                echo "</div>";
                }
                if($verfied == "1"){   }
       
?>
And Then This You Put In HTML Form
HTML:
<div class="panel panel-default">
              <div class="panel-body">
                        <b><h style="font-size:16px">Nickname : <h style="color:#4BB2FC"><?php echo $client_info["client_nickname"];?></h></h></b><br>
                        <b><h style="font-size:16px">your IP : <h style="color:#4BB2FC"><?php echo $client_info["connection_client_ip"];?></h></h></b><br>                         
                        <b><h style="font-size:16px">Description : <h style="color:#4BB2FC"><?php echo $client_info["client_description"];?></h></h></b><br>
                        <b><h style="font-size:16px">Total Connections : <h style="color:#4BB2FC"><?php echo $client_info["client_totalconnections"];?></h></h></b><br>
                        <b><h style="font-size:16px">OS : <h style="color:#4BB2FC"><?php echo $client_info["client_totalconnections"];?><?php echo $client_info["client_version"];?><i class="fa fa-windows" aria-hidden="true"></i></h></h></b><br>
                        <b><h style="font-size:16px">Country : <h style="color:#4BB2FC"><?php echo $client_info["client_country"];?></h></h></b><br>
                        <b><h style="font-size:16px">Database ID : <h style="color:#4BB2FC"><?php echo $client_info["client_database_id"];?></h></h></b><br>
                        <b><h style="font-size:16px">Unique Identifier : <h style="color:#4BB2FC"><?php echo $client_info["client_unique_identifier"];?></h></h></b>
              </div>
            </div>
 

EscuderoKevin

Active Member
Joined
Jul 2, 2015
Messages
382
Reaction score
181
Points
90
Age
26
Location
Argentina
Website
www.worhost.net
PHP:
<?php
        //framework
        require_once("libraries/TeamSpeak3/TeamSpeak3.php");
        session_start();
        $IDChannel = $_POST['name'];
        $resume_time = time();
        $result = array();
        $verfied = "0";
        try {
                $ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]_ip:10011/?server_port=9987&nickname=botname");
                foreach ($ts3_VirtualServer->clientList() as $cl) {
                                        if ($cl->getProperty('connection_client_ip') == $_SERVER['REMOTE_ADDR']) {
                                                $result[] = $cl->client_nickname;
                                                $client_info = $cl;
                                                $verfied++;
                                                $unid = $client_info["client_unique_identifier"];
                $_SESSION['client_uid'] = $unid;
        $client_uid = $unid;
        $_SESSION['client_db'] = $client["client_database_id"];
                                }
                        }
                }    
                catch (Exception $e) {
                        echo '<div style="background-color:red; color:white; display:block; font-weight:bold;">QueryError: ' . $e->getCode() . ' ' . $e->getMessage() . '</div>';
                        die;
                        }
                if($verfied == "0"){
                //not in ts
                echo "<div id='error'>";
                echo "You are not in Teamspeak Server.";
                echo "<a href='ts3server://185.11.146.141/?port=9987&nickname=WebGuest'>Join our TeamSpeak Server Here</a>";
                echo "</div>";
                }
                if($verfied == "1"){   }
      
?>
And Then This You Put In HTML Form
HTML:
<div class="panel panel-default">
              <div class="panel-body">
                        <b><h style="font-size:16px">Nickname : <h style="color:#4BB2FC"><?php echo $client_info["client_nickname"];?></h></h></b><br>
                        <b><h style="font-size:16px">your IP : <h style="color:#4BB2FC"><?php echo $client_info["connection_client_ip"];?></h></h></b><br>                        
                        <b><h style="font-size:16px">Description : <h style="color:#4BB2FC"><?php echo $client_info["client_description"];?></h></h></b><br>
                        <b><h style="font-size:16px">Total Connections : <h style="color:#4BB2FC"><?php echo $client_info["client_totalconnections"];?></h></h></b><br>
                        <b><h style="font-size:16px">OS : <h style="color:#4BB2FC"><?php echo $client_info["client_totalconnections"];?><?php echo $client_info["client_version"];?><i class="fa fa-windows" aria-hidden="true"></i></h></h></b><br>
                        <b><h style="font-size:16px">Country : <h style="color:#4BB2FC"><?php echo $client_info["client_country"];?></h></h></b><br>
                        <b><h style="font-size:16px">Database ID : <h style="color:#4BB2FC"><?php echo $client_info["client_database_id"];?></h></h></b><br>
                        <b><h style="font-size:16px">Unique Identifier : <h style="color:#4BB2FC"><?php echo $client_info["client_unique_identifier"];?></h></h></b>
              </div>
            </div>
Its Solved ,read pls.
 

DDoSBoy

Member
Joined
May 11, 2016
Messages
58
Reaction score
22
Points
56
Age
24
PHP:
<?php
        //framework
        require_once("libraries/TeamSpeak3/TeamSpeak3.php");
        session_start();
        $IDChannel = $_POST['name'];
        $resume_time = time();
        $result = array();
        $verfied = "0";
        try {
                $ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]_ip:10011/?server_port=9987&nickname=botname");
                foreach ($ts3_VirtualServer->clientList() as $cl) {
                                        if ($cl->getProperty('connection_client_ip') == $_SERVER['REMOTE_ADDR']) {
                                                $result[] = $cl->client_nickname;
                                                $client_info = $cl;
                                                $verfied++;
                                                $unid = $client_info["client_unique_identifier"];
                $_SESSION['client_uid'] = $unid;
        $client_uid = $unid;
        $_SESSION['client_db'] = $client["client_database_id"];
                                }
                        }
                }    
                catch (Exception $e) {
                        echo '<div style="background-color:red; color:white; display:block; font-weight:bold;">QueryError: ' . $e->getCode() . ' ' . $e->getMessage() . '</div>';
                        die;
                        }
                if($verfied == "0"){
                //not in ts
                echo "<div id='error'>";
                echo "You are not in Teamspeak Server.";
                echo "<a href='ts3server://185.11.146.141/?port=9987&nickname=WebGuest'>Join our TeamSpeak Server Here</a>";
                echo "</div>";
                }
                if($verfied == "1"){   }
      
?>
And Then This You Put In HTML Form
HTML:
<div class="panel panel-default">
              <div class="panel-body">
                        <b><h style="font-size:16px">Nickname : <h style="color:#4BB2FC"><?php echo $client_info["client_nickname"];?></h></h></b><br>
                        <b><h style="font-size:16px">your IP : <h style="color:#4BB2FC"><?php echo $client_info["connection_client_ip"];?></h></h></b><br>                        
                        <b><h style="font-size:16px">Description : <h style="color:#4BB2FC"><?php echo $client_info["client_description"];?></h></h></b><br>
                        <b><h style="font-size:16px">Total Connections : <h style="color:#4BB2FC"><?php echo $client_info["client_totalconnections"];?></h></h></b><br>
                        <b><h style="font-size:16px">OS : <h style="color:#4BB2FC"><?php echo $client_info["client_totalconnections"];?><?php echo $client_info["client_version"];?><i class="fa fa-windows" aria-hidden="true"></i></h></h></b><br>
                        <b><h style="font-size:16px">Country : <h style="color:#4BB2FC"><?php echo $client_info["client_country"];?></h></h></b><br>
                        <b><h style="font-size:16px">Database ID : <h style="color:#4BB2FC"><?php echo $client_info["client_database_id"];?></h></h></b><br>
                        <b><h style="font-size:16px">Unique Identifier : <h style="color:#4BB2FC"><?php echo $client_info["client_unique_identifier"];?></h></h></b>
              </div>
            </div>
Nice By Ma7mouD .....
 

Top