Запуск шпатлевки (с параметром) с веб-сайта с помощью JavaScript или PHPPhp

Кемеровские программисты php общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Запуск шпатлевки (с параметром) с веб-сайта с помощью JavaScript или PHP

Сообщение Anonymous »


I want people to access switch, servers on my site thank to putty. Users will see the list of all the devices. When they will click on one of them, I want putty to open with the good protocol (ssh or telnet) and the good address. If they click on another name this will open putty on another address.

Ex.: putty.exe -ssh 192.168.0.1

My idea was to start cmd and to execute this command in it.

I first tried PHP (system(), exec(), shell_exec()) but didn't work. I'm now looking for solution with JavaScript. Already tried exec() and execute() but doesn't worked for me.

So far the only solution I found was making script.bat and put the command in it But this is not what I'm looking for!. Moreover It only works with IE and I need a lot of script because there is a lot of devices.

Edit:

My wish is to make it functionnal on IE AND Mozilla.
  • I tried a direct link with but in Mozilla it asks if you want to download the file and not execute it.
  • Using a JScript that use WshShell.Run and save the page as .hta makes it work but it literally takes 1 minute to open Putty.
  • Using a link to the JScript doesn't work, it asks me if I want to download it and not execute it.

The server can be Windows or Linux, but the users will use Windows to access the site. I only want to use JScript / PHP on this site. In addition I don't want user need to change their putty, I wish this could be accessible to every user that got putty installed (and added to PATH).


Источник: https://stackoverflow.com/questions/414 ... ipt-or-php
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Php»