Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 333689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:59:05+00:00 2026-05-12T09:59:05+00:00

Ok, so here’s the thing. I need to read the output (the one that

  • 0

Ok, so here’s the thing. I need to read the output (the one that you usually see in a linux console). My biggest problem is that I don’t need to read the output of a linear execution, but something rather like wget http://ubuntu.com/jaunty.iso and show its ETA.

Also, the work-flow is the following:

S – webserver

C1 – computer1 in S’s intranet

C2 – computer 2 in S’s intranet

and so on.

User connects to S which connects to Cx then starts a wget, top or other console logging command (at user’s request). User can see the “console log” from Cx while wget downloads the specified target.

Is this plausible? Can it be done without using a server/client software?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:59:05+00:00Added an answer on May 12, 2026 at 9:59 am

    You’ll want to use the php function proc_open for this — you can specify an array of pipes (stdin, which would normally be attached to the keyboard if you were on the console, std out, and stderr, both normally would be printed to the display). You can then control the input/output folw of the given program

    So as an example:

    $pipes = array();
    $pipe_descriptions = array(
       0 => array("pipe", "r"),  // stdin is a pipe that the child will read from
       1 => array("pipe", "w"),  // stdout is a pipe that the child will write to
       2 => array("file", "/tmp/error-output.txt", "a") // stderr is a file to write to
    );
    
    $cmd = "wget $url";
    
    $proc_handle = proc_open($cmd, $pipe_descriptions, $pipes);
    
    if(is_resource($proc_handle))
    {
       // Your process is running. You may now read it's output with fread($pipes[1]) and fread($pipes[2])
       // Send input to your program with fwrite($pipes[0])
       // remember to fclose() all pipes and fclose() the process when you're done!
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's a coding problem for those that like this kind of thing. Let's see
Here is the problem that I am trying to solve. I have two folders
Here's the code I have. It works. The only problem is that the first
Here is another spoj problem that asks how to find the number of distinct
Here is a simple function which i made on PHP. The problem is that
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here's my problem I have this javascript if (exchRate != ) { function roundthecon()
Here is my problem : I have a post controller with the action create.
Here is the problem I'm trying to solve for my game. I have this
Here's a dump of the stats provided my mod_pagespeed from one of my sites.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.