You are here: Exec() and 'keyboard' input « PHP Programming Language « IT news, forums, messages
Exec() and 'keyboard' input

Posted by bwgames on 10/07/07 15:46

Hi there,

I have a script that takes two inputs from the keyboard to change some
settings on some equipment. I would usually run this as e.g.

ben@srv001:/$ change-settings<enter>
new-setting 1 <enter>
new-setting2 <enter>
Settings successfully changed
ben@srv001:/$

I want to automate this from a PHP script (it will be for my use only
with restricted access via .htaccess etc, so security is not a major
issue).

I can do system or exec("change-settings"); ok, but how do I 'enter'
the input from a php-script? The new-settings1 and 2 will be stored
in variables in PHP.

Thanks,

Ben

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация