SulimanAbdulaziz
Member
- Mar 20, 2016
- 39
- 4
- 43
- Thread starter
- #21
sorry i have a problemGet IP.
Get UID: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; }
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; }
http://prntscr.com/bqxjya
I am inside In Teamspeak3