Author Topic: telnet  (Read 1961 times)

0 Members and 1 Guest are viewing this topic.

Offline micfort

  • Major(1)
  • Posts: 2
telnet
« on: October 29, 2006, 02:52:58 pm »
Can anyone tell me how to connect with telnet to the soldat server?
this is for a php script that I'm working on

Offline Clawbug

  • Veteran
  • *****
  • Posts: 1393
  • 1184!
Re: telnet
« Reply #1 on: October 29, 2006, 05:47:10 pm »
Why do you use telnet? PHP has ice built-in sockets to use. All the needed stuff should be able to be done with some simple PHP. :P
Fight! Win! Prevail!

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: telnet
« Reply #2 on: October 29, 2006, 06:03:53 pm »
he may be looking for info on how to connect with telnet so that he can test things out before coding for them in php. 

to connect with telnet, you connect to the soldat server's IP on the game port, default 23073.

you need to send the admin password as soon as you connect, I think you have about half a second to send it.  if you're just doing this for testing purposes, I'd recommend changing your admin pass to 1 letter temporarily so that this is more possible. 

To connect with php, just use fsockopen and send the password on the next line.

Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: telnet
« Reply #3 on: October 29, 2006, 06:31:13 pm »
er, in case you're very lazy, here's a simple php snip:

Code: [Select]
<?php
$ip 
"24.24.24.24";
$port "23073";
$adminpasswerd "johnnybgood";
$tonymontana fsockopen($ip$port$err$err230);
fwrite($tonymontana$adminpasswerd);

// doooooo stuuf here
// eg
// $bufferz = fgets($tonymontana, 1024);

fclose($tonymontana);
?>

Offline micfort

  • Major(1)
  • Posts: 2
Re: telnet
« Reply #4 on: October 30, 2006, 03:04:47 am »
tnx
that explains that it connects to my server but I instantly kicked out

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: telnet
« Reply #5 on: October 30, 2006, 03:38:39 am »
tnx
that explains that it connects to my server but I instantly kicked out

Because your using an invalid admin password, or your not using a loop to read data.

Offline mar77a

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1295
  • mad
    • random stuffs
Re: telnet
« Reply #6 on: October 30, 2006, 03:35:24 pm »
tnx
that explains that it connects to my server but I instantly kicked out

Because your using an invalid admin password, or your not using a loop to read data.

Because you have to send the password quickly.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: telnet
« Reply #7 on: October 30, 2006, 03:47:44 pm »
Which is exactly what l said and is why he replied with "...that explains it..."