Questions on exec() command
Posted 28 August 2006 - 06:42 AM
I'm currently using my server as kinda a BitTorrent Machine, and I want to program a Web-Application that can do the following things.
-Allow Upload of Torrent Files (Completed 100%)
-Allow you to view whats currently downloading (Lost on how)
-Allow you to view information on the torrent (Lost on how x2)
The Linux box has a screen that runs my BitTorrent Application.
I wanted to know if it was possible using the exec command to log into that screen, say, Capure the information, and then return
all the outputted text to a web page. or, if at all possible, capture bits a pieces (the important stuff) and be able to save them as variables so I can return them in a really pretty fasion.
Current Output of the Screen running BitTornado EXP >>> http://rafb.net/past...s/IZ8Lyl86.html Pasted in No-Paste since the forum doesn't like linux spacing.
I would like to be able to output that kind of data on a webpage that looks similar to this
I would like to know if this is possible, or even if there is already software like this out there.... if there is, I'd like to get my hands on some. >]
Posted 28 August 2006 - 06:48 AM
$output = array(); exec("your_cmd",$output);
$output will contain every line in an array.
Loot at http://us3.php.net/function.exec for more information.
If there is a way for this program to output text with a certain command then it may be possible. Although... I don't know if you can login and then capture all the data. Anyone?
Posted 28 August 2006 - 07:17 AM
I've got my BitTorrent screen running under a BT User.
screens themselves seems to be hidden per-user. IE: user apache cannot see user BT's screens.
I was trying to see if anyone had some knowledge of how to maybe change the user, with exec,
exec("su bt;password;screen -x bt",$output);
doesn't seem to do the trick...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users