Currently, I would like to call Tool Command Language Scripts that is located in server A.
When a user surf a website that is hosted in server B. When, a user click on a button for example, I would like the php file to execute the Tcl scripts that is located in server B.
How do I do that?
Thank you in advance.
Use a PHP execution operator (note that you should be extremely careful - if possible, limit to valid scripts instead of letting the user specify arbitrary commands in a GET or POST variable).
Example:
http://myserver.com/php_scriptname.php?tcl_call=asdf.tcl
Edit:
Your question presently reads:
... but if you wanted to call a script on server "A", you could set up an SSH key and then call SSH from your script on server "B" - for example:
(Single quotes and backticks)
Note that you can store what is returned from the execution operator in a variable or echo it - you may want to echo the return value and include
2>&1
at the end of every command you run for debugging.