PDA

View Full Version : telnet login via PHP


Connor
24-03-2006, 21:51
Anyone know how to login to the telnet with PHP? Help would be nice, I have the connection script I just can't get it to login and desplay the information that I pull from the server... I am using fsockopen... please help.

Cyrus
24-03-2006, 22:14
show us your script

Connor
24-03-2006, 22:23
if($_GET['op'] == "server_list"){
$fp = fsockopen($serv, $quar, $errno, $errsrt, 15);
$fp1 = fputs($fp, "slogin ".$susr." ".$spas."");
$fp2 = fputs($fp, "sl");
echo $fp1;
echo "<center>| <a href='admin.php?op=server_list&page=full_logs'>Server Logs</a> |</center><hr>";
if(!$fp){
echo "<center>There is a Telnet error. (This script times out in 15 seconds)<br>Sorry for any problems this may of caused.</center>";
}else{
echo "<table width='80%' border='1' align='center'>
<tr>
<td align='center'>Port</td>
<td align='center'>Server Name</td>
<td align='center'>Owner</td>
<td align='center'>&nbsp;</td>
<td align='center'>&nbsp;</td>
<td align='center'>&nbsp;</td>
</tr>
<tr>
<td align='center'>PORT HERE</td>
<td align='center'>NAME HERE</td>
<td align='center'>OWNER HERE</td>
<td align='center'>START/STOP</td>
<td align='center'>EDIT</td>
<td align='center'>DELETE</td>
</tr>
</table>";
fclose($fp);
}
What I am trying to do is pull the server information out and make it so it will match up to data in a sql server so I can have a database of servers and owners, but I am gonna make it so the admin can start, stop, edit, delete servers with it too. I also know that there it is just echoing a number out now...

Cyrus
24-03-2006, 22:33
What you need is a good PHP tutorial or book.
You have to understand how Sockethandling works before you try to interact with TeamSpeak.

Slacker.
25-03-2006, 22:21
http://www.learn-php-tutorial.com/
http://www.w3schools.com/php/default.asp
http://www.phpfreaks.com/
i maker it more easy on me lol
http://www.google.com/search?hs=ivv&hl=en&lr=&client=opera&rls=en&q=learn+php&btnG=Search