-1

I have putty.exe on my desktop so if I will go to command prompt and then to C:\Documents and Settings\user\Desktop location and execute following command it will launch the Putty window of telnet connection to server specified:

putty.exe telnet://a.b.c.d/

I am trying to launch the putty to telnet to specific server using following but its not working for me:

<?php
$securecrt = "C:\\Documents and Settings\\user\\Desktop\\putty.exe telnet://a.b.c.d/ ";


exec($securecrt);
?>

If I try following then it launches the putty application but will have to provide the host name or IP to login:

<?php
$securecrt = "C:\\Documents and Settings\\user\\Desktop\\putty.exe ";


exec($securecrt);
?>

Not sure if I am missing something very basic, It will be great if someone can help with this.

Nikola K.
  • 7,093
  • 13
  • 31
  • 39
devnp
  • 93
  • 2
  • 9

1 Answers1

0

Instead of using Putty, you could try to use PHP with fsock or use a class like http://www.geckotribe.com/php-telnet/

However, you can try the following using your current setup:

$securecrt = '"C:\Documents and Settings\user\Desktop\putty.exe" telnet://a.b.c.d/';
johnmadrak
  • 840
  • 5
  • 7