Execute unix command from an html page in windows


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute unix command from an html page in windows
# 1  
Old 09-15-2010
MySQL Execute unix command from an html page in windows

i have a problem situation, where i have a html file say click.html. i have a button "ls" in that html page. i run this html file in windows....Now say if i click that "ls" button it must connect to the unix server and execute ls and return the results back to html page in windows. can anyone tell me how to do this??
This User Gave Thanks to niteesh_!7 For This Post:
# 2  
Old 09-15-2010
If you need a dinamic generation , PHP is your solution.
# 3  
Old 09-15-2010
i do not know php...can you help with this....can you send a sample file
# 4  
Old 09-15-2010
this is not possible with plain HTML
# 5  
Old 09-15-2010
ANY SOLUTION????.....i mean any approach that i can follow to do it....
# 6  
Old 09-15-2010
niteesh,

in simple, this needs something which can execute code on your behalf on web server, whereas using simple HTML ( as far as I know ) is only the presentation of the contents to client's browser.

for this 'ls' thing, what you need to do is the enable your server side to execute a command on server side and then manipulate the resulting information to present to client.

This is where your server side scripting languages come in place. They, like starting from JavaScript, perl, PHP, python, ASP, JSP, and many more, are used to process a user's input based on the decisions that you involve using data structures like 'if-else-then', 'while-do', 'do-while', 'for-loop'. Once this data is processed on server side, then you prepare that data to be presented to customer.

like if you plan to execute a command on server when a client user clicks 'ls' button , you must have some destination setup on in <FORM> tag against "action" item

Code:
<form action="service.php" method="get">

now when a user will click a submit button, the service.php will be executed on the server side as opposed to HTML which has nothing to do on server in a basic form,
and then your code will in 'service.php' will be processed using a php processor which understands the php language's contructs, and providing service.php's formatted contents to client's browser, eventually displaying the data client had asked for.

in 'service.php', you declare variables, perform all actions based on the input received from previous page.

hope this helps.

Regards,
Nasir
This User Gave Thanks to busyboy For This Post:
# 7  
Old 09-15-2010
Small correction to that: JavaScript is executed on the client, not the server.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute command and show result in web page

Hi everyone, I have two question 1- I want to execute command in shell and after execution result show in a web server. (kind of making UI ) e.g. in shell root ~: show list item1 item2 item(n)in web server in a page draw a table and show those items in itno | name... (1 Reply)
Discussion started by: indeed_1
1 Replies

2. Shell Programming and Scripting

How to generate HTML page from UNIX script out-put?

Hi All. This my first post to this forum, and i assuming it will be best out-of all. I am quite new to Unix scripting so please excuse me for any silly questions - I am trying to create on Unix script in which it telnet to my server, check the connectivity of the server and then it... (2 Replies)
Discussion started by: HHarsh
2 Replies

3. AIX

How to Use a UNIX Shell Script to Create an HTML Web Page?

dear friends , in my work i have to monitor some system performance in hourly basis by runing some commands , for example (lpstat) to know that all the queue is ready how can i create webpage and connect it with the server (AIX operating system) and make this page refreshed every 10 second and... (12 Replies)
Discussion started by: rami abusweilei
12 Replies

4. Solaris

how to execute shell script present in unix machine remotely from windows

how to execute shell script present in unix machine remotely from windows? I having a shell script in my unix machine, need to execute the script remotely from my windows machine using Visual Basic or VBA macros. Thanks In Advance. --Suresh (1 Reply)
Discussion started by: sureshmani
1 Replies

5. UNIX for Advanced & Expert Users

Help to get file from windows to Unix via HTML

Dear, I have a requirement as below: I need an exe or bat file to facilitate multiple end users to upload their files (csv or xls) from windows environment to Unix server. Any front end like html would also be fine, I can develop a simple HTML script with browse button but not sure on... (4 Replies)
Discussion started by: Imran_Chennai
4 Replies

6. Web Development

Login page in html on unix

I want to create a login page in HTML which is hosted on apache server. The login page first authenticate the user and then directed to a form which in turn run a script on the server. I want to make login page without php or jsp. Please advice. (13 Replies)
Discussion started by: ravi18s
13 Replies

7. UNIX and Linux Applications

Html web page to Unix Connectivity

Hi All, I need a basic overview of connecting a HTML web page to Unix I will give a brief of my exact requirement. There will be a front end HTML page - a web page which will have certain buttons. Each button will have certain functionality. For eg: There is a button for Disk Usage. When the... (1 Reply)
Discussion started by: abhilashnair
1 Replies

8. UNIX for Dummies Questions & Answers

Execute script on Unix/Linux from Windows

Hello ALL, Does anyone know how I can execute a script on Unix or Linux? Details: This execution needs to start from Windows and I need to pass some parameters to the script. If anyone knows how to execute, please, let me know. Please, send me an example how it is possible. Thanks. (4 Replies)
Discussion started by: brbillyh
4 Replies

9. Shell Programming and Scripting

linking unix generated text file to html page

i am trying to link the text files that i generated from my shell script to an html page, to that i can view them using a browser, like internet explorer. i want to open the text files in html page when i enter a command to view the text file from the shell command. please could anyone help... (1 Reply)
Discussion started by: alexd
1 Replies

10. News, Links, Events and Announcements

Unix Manual (man-page) pages in HTML

LINK: Unix Manual (man page) pages in HTML http://www.rt.com/man/ : More then 100 Commands found on a Unix system mannual pages can be obtained/refered here. Good Link.. (1 Reply)
Discussion started by: killerserv
1 Replies
Login or Register to Ask a Question