LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-27-2012, 01:42 AM   #1
ruchirarsm
LQ Newbie
 
Registered: Aug 2012
Posts: 3

Rep: Reputation: Disabled
Linux terminal to php


Hi,
I was trying to send Linux commands to a terminal and get the respective outputs via a web browser by integrating the terminal with php and ajax.(simply I'm expecting an online putty command line to my web page which will communicate with host via SSH). guys please help me with this
 
Old 08-27-2012, 09:58 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,314

Rep: Reputation: 3877Reputation: 3877Reputation: 3877Reputation: 3877Reputation: 3877Reputation: 3877Reputation: 3877Reputation: 3877Reputation: 3877Reputation: 3877Reputation: 3877
Quote:
Originally Posted by ruchirarsm View Post
Hi,
I was trying to send Linux commands to a terminal and get the respective outputs via a web browser by integrating the terminal with php and ajax.(simply I'm expecting an online putty command line to my web page which will communicate with host via SSH). guys please help me with this
You can look up the system and exec functions in PHP; in your case, I'd look at the exec function. It will run whatever external command you want (along with command-line arguments), and return the output of that to a variable, which you can then echo to the screen.
 
1 members found this post helpful.
Old 08-27-2012, 11:31 PM   #3
ruchirarsm
LQ Newbie
 
Registered: Aug 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
TB0ne Thanks for the quick solution. think this will help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
embed terminal in html-php webpage maradnus Programming 2 12-07-2011 12:28 PM
Run php scripts in terminal gpm1982 Programming 3 04-30-2008 04:20 AM
can i run a php program to connect to mysql db 4.0 in terminal supritipanda Programming 4 08-11-2006 12:11 PM
can i run .php trom terminal samnjugu Linux - Software 6 04-20-2006 08:54 AM
Running a terminal/prompt from PHP james_cwy Linux - Newbie 1 12-15-2003 01:09 AM


All times are GMT -5. The time now is 05:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration