infamous0122 Posted August 28, 2006 Share Posted August 28, 2006 I'm running Linux, (Fedora Core 4) as my server, and PHP 4.3.xxI'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 >>> [url=http://rafb.net/paste/results/IZ8Lyl86.html]http://rafb.net/paste/results/IZ8Lyl86.html[/url] 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 [img]http://digirev.us/BT.jpg[/img]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. >] Quote Link to comment Share on other sites More sharing options...
Corona4456 Posted August 28, 2006 Share Posted August 28, 2006 using exec() you can do as follows to caputer output that is outputted by a certain program.[code]$output = array();exec("your_cmd",$output);[/code]$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? Quote Link to comment Share on other sites More sharing options...
infamous0122 Posted August 28, 2006 Author Share Posted August 28, 2006 ok, More or less my question was this, and this is where I'm stuck (I failed to mention my attempts)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, [color=red]exec("su bt;password;screen -x bt",$output);[/color]doesn't seem to do the trick... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.